Module: Validation

Defined in:
lib/validation.rb

Defined Under Namespace

Classes: BaseValidator, FileValidator, InvalidValidatorException, ValidationRegistry, Validator

Constant Summary

C32_V2_1_2_3_TYPE =
'C32 v2.1/v2.3'
C32_V2_5_TYPE =
'C32 v2.5'
C32_NHIN_TYPE =
'NHIN C32'
CCR_TYPE =
'CCR'

Class Method Summary (collapse)

Class Method Details

+ (Object) get_validator(type)



16
17
18
# File 'lib/validation.rb', line 16

def Validation.get_validator(type)
  ValidationRegistry.instance.get_validator(type)
end

+ (Object) register_validator(doc_type, validator)



12
13
14
# File 'lib/validation.rb', line 12

def Validation.register_validator(doc_type, validator)
  ValidationRegistry.instance.register_validator(doc_type, validator)
end

+ (Object) types



24
25
26
# File 'lib/validation.rb', line 24

def Validation.types
  ValidationRegistry.instance.types
end

+ (Object) unregister_validators



8
9
10
# File 'lib/validation.rb', line 8

def Validation.unregister_validators
  ValidationRegistry.instance.unregister_validators
end

+ (Object) validate(patient_data, document)



20
21
22
# File 'lib/validation.rb', line 20

def Validation.validate(patient_data, document)
  get_validator(document.doc_type).validate(patient_data,document)
end