示例#1
0
class FillOptions(DataModelOptions):
    model_class_name = 'Fill'
    serializers = FillSerializers
    field_validators = {
        'date': [NonNullValidator()],
        'dispenseDaysSupply': [NonNullValidator()],
    }
示例#2
0
class ProblemOptions(DataModelOptions):
    model_class_name = 'Problem'
    serializers = ProblemSerializers
    field_validators = {
        'name_system': [ExactValueValidator(SNOMED_URI)],
        'name_title': [NonNullValidator()],
        'startDate': [NonNullValidator()],
    }
示例#3
0
class ProblemOptions(DataModelOptions):
    model_class_name = 'Problem'
    serializers = ProblemSerializers
    field_validators = {
        'appointment_title': [NonNullValidator()],
        'date': [NonNullValidator()],
        'time': [NonNullValidator()],
    }
示例#4
0
class EncounterOptions(DataModelOptions):
    model_class_name = 'Encounter'
    serializers = EncounterSerializers
    field_validators = {
        'encounterType_system': [ExactValueValidator(ENC_TYPE_URI)],
        'encounterType_identifier': [ValueInSetValidator(ENC_TYPES)],
        'encounterType_title': [NonNullValidator()],
        'startDate': [NonNullValidator()],
    }
示例#5
0
class MedicationOptions(DataModelOptions):
    model_class_name = 'Medication'
    serializers = MedicationSerializers
    field_validators = {
        'drugName_system': [ExactValueValidator(RXN_URI)],
#        'drugName_identifier': [NonNullValidator()],
        'drugName_title': [NonNullValidator()],
        'provenance_system': [ExactValueValidator(MED_PROV_URI, nullable=True)],
        'provenance_identifier': [ValueInSetValidator(MED_PROVS, nullable=True)],
        'startDate': [NonNullValidator()],
        }
示例#6
0
class ProcedureOptions(DataModelOptions):
    model_class_name = 'Procedure'
    serializers = ProcedureSerializers
    field_validators = {
        'date_performed': [NonNullValidator()],
        'name' : [NonNullValidator()],#ExactValueValidator(SNOMED_URI)],
#        'name_type': [NonNullValidator()],
 #       'name_value': [NonNullValidator()],
#       'name_abbrev': [NonNullValidator()],
#        'provider_name' : [NonNullValidator()],
#        'location': [NonNullValidator()],
#        'comments':[NonNullValidator()],
        }
示例#7
0
class MeasurementsOptions(DataModelOptions):
    model_class_name = 'Measurements'
    serializers = MeasurementsSerializers
    field_validators = {
        'value': [NonNullValidator()],
        'name': [NonNullValidator()],  #ExactValueValidator(SNOMED_URI)],
        #        'name_type': [NonNullValidator()],
        #       'name_value': [NonNullValidator()],
        #       'name_abbrev': [NonNullValidator()],
        #        'provider_name' : [NonNullValidator()],
        #        'location': [NonNullValidator()],
        #        'comments':[NonNullValidator()],
    }
示例#8
0
class LabOptions(DataModelOptions):
    model_class_name = 'LabResult'
    serializers = LabSerializers
    field_validators = {
        'abnormal_interpretation_system':
        [ExactValueValidator(LAB_INTERP_URI, nullable=True)],
        'abnormal_interpretation_identifier':
        [ValueInSetValidator(VALID_INTERPS, nullable=True)],
        'test_name_system': [ExactValueValidator(LOINC_URI)],
        'test_name_identifier': [NonNullValidator()],
        'test_name_title': [NonNullValidator()],
        'status_system': [ExactValueValidator(LAB_STATUS_URI, nullable=True)],
        'status_identifier':
        [ValueInSetValidator(VALID_STATUSES, nullable=True)],
    }
示例#9
0
class edssOptions(DataModelOptions):
    model_class_name = 'edss'
    serializers = edssSerializers
    field_validators = {
        'date_performed': [NonNullValidator()],
        'visual': [NonNullValidator()],
        'brainstem': [NonNullValidator()],
        'pyramidal': [NonNullValidator()],
        'cerebellar': [NonNullValidator()],
        'sensory': [NonNullValidator()],
        'bladder': [NonNullValidator()],
        'cerebral': [NonNullValidator()],
        'ambulation': [NonNullValidator()],
        'score': [NonNullValidator()],
    }
示例#10
0
class AllergyExclusionOptions(DataModelOptions):
    model_class_name = 'AllergyExclusion'
    field_validators = {
        'name_system': [ExactValueValidator(SNOMED)],
        'name_identifier': [ValueInSetValidator(VALID_EXCLUSION_IDS)],
        'name_title': [NonNullValidator()],
    }
示例#11
0
class AllergyOptions(DataModelOptions):
    model_class_name = 'Allergy'
    field_validators = {
        'allergic_reaction_system': [ExactValueValidator(SNOMED)],
        #        'allergic_reaction_identifier': [NonNullValidator()],
        'allergic_reaction_title': [NonNullValidator()],
        'category_system': [ExactValueValidator(SNOMED)],
        'category_identifier': [ValueInSetValidator(VALID_CATEGORY_IDS)],
        'category_title': [NonNullValidator()],
        'drug_allergen_system': [ExactValueValidator(RXNORM, nullable=True)],
        'drug_class_allergen_system':
        [ExactValueValidator(NUI, nullable=True)],
        'food_allergen_system': [ExactValueValidator(UNII, nullable=True)],
        'severity_system': [ExactValueValidator(SNOMED)],
        'severity_identifier': [ValueInSetValidator(VALID_SEVERITY_IDS)],
        'severity_title': [NonNullValidator()],
    }
示例#12
0
class ImmunizationOptions(DataModelOptions):
    model_class_name = 'Immunization'
    serializers = ImmunizationSerializers
    field_validators = {
        'date': [NonNullValidator()],
        'administration_status_system': [ExactValueValidator(IMM_STATUS_URI)],
        'administration_status_identifier':
        [ValueInSetValidator(VALID_IMM_STATUSES)],
        'administration_status_title': [NonNullValidator()],
        'product_class_system':
        [ExactValueValidator(IMM_CLASS_URI, nullable=True)],
        'product_class_2_system':
        [ExactValueValidator(IMM_CLASS_URI, nullable=True)],
        'product_name_system': [ExactValueValidator(IMM_PROD_URI)],
        'product_name_identifier': [NonNullValidator()],
        'product_name_title': [NonNullValidator()],
        'refusal_reason_system':
        [ExactValueValidator(IMM_REFUSE_URI, nullable=True)],
        'refusal_reason_identifier':
        [ValueInSetValidator(VALID_REFUSALS, nullable=True)],
    }
示例#13
0
class FiledocumentOptions(DataModelOptions):
    model_class_name = 'Filedocument'
    serializers = FiledocumentSerializers
    field_validators = {
        'filename': [NonNullValidator()],  #ExactValueValidator(SNOMED_URI)],
        #        'name_type': [NonNullValidator()],
        #       'name_value': [NonNullValidator()],
        #       'name_abbrev': [NonNullValidator()],
        #        'provider_name' : [NonNullValidator()],
        #        'location': [NonNullValidator()],
        #        'comments':[NonNullValidator()],
    }
示例#14
0
class VitalsOptions(DataModelOptions):
    model_class_name = 'VitalSigns'
    serializers = VitalsSerializers
    field_validators = {
        'date': [NonNullValidator()],
        'bp_position_system': [ExactValueValidator(SNOMED_URI, nullable=True)],
        'bp_position_identifier':
        [ValueInSetValidator(BP_POSITION_IDS, nullable=True)],
        'bp_site_system': [ExactValueValidator(SNOMED_URI, nullable=True)],
        'bp_site_identifier':
        [ValueInSetValidator(BP_SITE_IDS, nullable=True)],
        'bp_method_system':
        [ExactValueValidator(BP_METHOD_URI, nullable=True)],
        'bp_method_identifier':
        [ValueInSetValidator(BP_METHODS, nullable=True)],
        'bp_diastolic_unit': [ValueInSetValidator(UNITS['bp'], nullable=True)],
        'bp_diastolic_name_system':
        [ExactValueValidator(LOINC_URI, nullable=True)],
        'bp_diastolic_name_identifier':
        [ValueInSetValidator(VITAL_SIGN_IDS['bp_diastolic'], nullable=True)],
        'bp_systolic_unit': [ValueInSetValidator(UNITS['bp'], nullable=True)],
        'bp_systolic_name_system':
        [ExactValueValidator(LOINC_URI, nullable=True)],
        'bp_systolic_name_identifier':
        [ValueInSetValidator(VITAL_SIGN_IDS['bp_systolic'], nullable=True)],
        'bmi_unit': [ValueInSetValidator(UNITS['bmi'], nullable=True)],
        'bmi_name_system': [ExactValueValidator(LOINC_URI, nullable=True)],
        'bmi_name_identifier':
        [ValueInSetValidator(VITAL_SIGN_IDS['bmi'], nullable=True)],
        'heart_rate_unit':
        [ValueInSetValidator(UNITS['heart_rate'], nullable=True)],
        'heart_rate_name_system':
        [ExactValueValidator(LOINC_URI, nullable=True)],
        'heart_rate_name_identifier':
        [ValueInSetValidator(VITAL_SIGN_IDS['heart_rate'], nullable=True)],
        'height_unit': [ValueInSetValidator(UNITS['height'], nullable=True)],
        'height_name_system': [ExactValueValidator(LOINC_URI, nullable=True)],
        'height_name_identifier': [
            ValueInSetValidator(VITAL_SIGN_IDS['height'], nullable=True)
        ],
        'oxygen_saturation_unit': [
            ValueInSetValidator(UNITS['oxygen_saturation'], nullable=True)
        ],
        'oxygen_saturation_name_system': [
            ExactValueValidator(LOINC_URI, nullable=True)
        ],
        'oxygen_saturation_name_identifier': [
            ValueInSetValidator(VITAL_SIGN_IDS['oxygen_saturation'],
                                nullable=True)
        ],
        'respiratory_rate_unit': [
            ValueInSetValidator(UNITS['resp_rate'], nullable=True)
        ],
        'respiratory_rate_name_system': [
            ExactValueValidator(LOINC_URI, nullable=True)
        ],
        'respiratory_rate_name_identifier': [
            ValueInSetValidator(VITAL_SIGN_IDS['resp_rate'], nullable=True)
        ],
        'temperature_unit': [
            ValueInSetValidator(UNITS['temperature'], nullable=True)
        ],
        'temperature_name_system': [
            ExactValueValidator(LOINC_URI, nullable=True)
        ],
        'temperature_name_identifier': [
            ValueInSetValidator(VITAL_SIGN_IDS['temperature'], nullable=True)
        ],
        'weight_unit': [ValueInSetValidator(UNITS['weight'], nullable=True)],
        'weight_name_system': [ExactValueValidator(LOINC_URI, nullable=True)],
        'weight_name_identifier': [
            ValueInSetValidator(VITAL_SIGN_IDS['weight'], nullable=True)
        ],
    }