cqm-models 0.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.eslintignore +1 -0
- data/.eslintrc.json +26 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +32 -0
- data/.gitignore +21 -0
- data/.rspec +2 -0
- data/.rubocop.yml +42 -0
- data/.travis.yml +21 -0
- data/Gemfile +5 -0
- data/LICENSE.txt +201 -0
- data/README.md +26 -0
- data/Rakefile +12 -0
- data/app/assets/javascripts/AdverseEvent.js +27 -0
- data/app/assets/javascripts/AllDataElements.js +120 -0
- data/app/assets/javascripts/AllergyIntolerance.js +27 -0
- data/app/assets/javascripts/AssessmentPerformed.js +30 -0
- data/app/assets/javascripts/AssessmentRecommended.js +27 -0
- data/app/assets/javascripts/CareGoal.js +25 -0
- data/app/assets/javascripts/CommunicationFromPatientToProvider.js +26 -0
- data/app/assets/javascripts/CommunicationFromProviderToPatient.js +26 -0
- data/app/assets/javascripts/CommunicationFromProviderToProvider.js +26 -0
- data/app/assets/javascripts/Component.js +22 -0
- data/app/assets/javascripts/Concept.js +14 -0
- data/app/assets/javascripts/DeviceApplied.js +29 -0
- data/app/assets/javascripts/DeviceOrder.js +26 -0
- data/app/assets/javascripts/DeviceRecommended.js +26 -0
- data/app/assets/javascripts/Diagnosis.js +27 -0
- data/app/assets/javascripts/DiagnosticStudyOrder.js +27 -0
- data/app/assets/javascripts/DiagnosticStudyPerformed.js +33 -0
- data/app/assets/javascripts/DiagnosticStudyRecommended.js +27 -0
- data/app/assets/javascripts/EncounterOrder.js +27 -0
- data/app/assets/javascripts/EncounterPerformed.js +32 -0
- data/app/assets/javascripts/EncounterRecommended.js +27 -0
- data/app/assets/javascripts/FacilityLocation.js +22 -0
- data/app/assets/javascripts/FamilyHistory.js +25 -0
- data/app/assets/javascripts/Id.js +22 -0
- data/app/assets/javascripts/ImmunizationAdministered.js +30 -0
- data/app/assets/javascripts/ImmunizationOrder.js +30 -0
- data/app/assets/javascripts/InterventionOrder.js +26 -0
- data/app/assets/javascripts/InterventionPerformed.js +29 -0
- data/app/assets/javascripts/InterventionRecommended.js +26 -0
- data/app/assets/javascripts/LaboratoryTestOrder.js +27 -0
- data/app/assets/javascripts/LaboratoryTestPerformed.js +33 -0
- data/app/assets/javascripts/LaboratoryTestRecommended.js +27 -0
- data/app/assets/javascripts/Measure.js +76 -0
- data/app/assets/javascripts/MeasurePackage.js +20 -0
- data/app/assets/javascripts/MedicationActive.js +28 -0
- data/app/assets/javascripts/MedicationAdministered.js +31 -0
- data/app/assets/javascripts/MedicationDischarge.js +30 -0
- data/app/assets/javascripts/MedicationDispensed.js +31 -0
- data/app/assets/javascripts/MedicationOrder.js +34 -0
- data/app/assets/javascripts/Participation.js +21 -0
- data/app/assets/javascripts/Patient.js +248 -0
- data/app/assets/javascripts/PatientCareExperience.js +23 -0
- data/app/assets/javascripts/PatientCharacteristic.js +23 -0
- data/app/assets/javascripts/PatientCharacteristicBirthdate.js +24 -0
- data/app/assets/javascripts/PatientCharacteristicClinicalTrialParticipant.js +26 -0
- data/app/assets/javascripts/PatientCharacteristicEthnicity.js +23 -0
- data/app/assets/javascripts/PatientCharacteristicExpired.js +25 -0
- data/app/assets/javascripts/PatientCharacteristicPayer.js +24 -0
- data/app/assets/javascripts/PatientCharacteristicRace.js +23 -0
- data/app/assets/javascripts/PatientCharacteristicSex.js +23 -0
- data/app/assets/javascripts/PhysicalExamOrder.js +28 -0
- data/app/assets/javascripts/PhysicalExamPerformed.js +31 -0
- data/app/assets/javascripts/PhysicalExamRecommended.js +28 -0
- data/app/assets/javascripts/ProcedureOrder.js +30 -0
- data/app/assets/javascripts/ProcedurePerformed.js +35 -0
- data/app/assets/javascripts/ProcedureRecommended.js +30 -0
- data/app/assets/javascripts/ProviderCareExperience.js +23 -0
- data/app/assets/javascripts/ProviderCharacteristic.js +23 -0
- data/app/assets/javascripts/Ratio.js +22 -0
- data/app/assets/javascripts/Result.js +28 -0
- data/app/assets/javascripts/ResultComponent.js +21 -0
- data/app/assets/javascripts/SubstanceAdministered.js +30 -0
- data/app/assets/javascripts/SubstanceOrder.js +32 -0
- data/app/assets/javascripts/SubstanceRecommended.js +32 -0
- data/app/assets/javascripts/Symptom.js +25 -0
- data/app/assets/javascripts/ValueSet.js +30 -0
- data/app/assets/javascripts/basetypes/Code.js +25 -0
- data/app/assets/javascripts/basetypes/DataElement.js +36 -0
- data/app/assets/javascripts/basetypes/DateTime.js +18 -0
- data/app/assets/javascripts/basetypes/Interval.js +35 -0
- data/app/assets/javascripts/basetypes/Quantity.js +20 -0
- data/app/assets/javascripts/index.js +12 -0
- data/app/models/models.rb +78 -0
- data/app/models/qdm/adverse_event.rb +15 -0
- data/app/models/qdm/allergy_intolerance.rb +15 -0
- data/app/models/qdm/assessment_performed.rb +18 -0
- data/app/models/qdm/assessment_recommended.rb +15 -0
- data/app/models/qdm/basetypes/code.rb +56 -0
- data/app/models/qdm/basetypes/data_element.rb +42 -0
- data/app/models/qdm/basetypes/interval.rb +54 -0
- data/app/models/qdm/basetypes/quantity.rb +52 -0
- data/app/models/qdm/care_goal.rb +13 -0
- data/app/models/qdm/communication_from_patient_to_provider.rb +14 -0
- data/app/models/qdm/communication_from_provider_to_patient.rb +14 -0
- data/app/models/qdm/communication_from_provider_to_provider.rb +14 -0
- data/app/models/qdm/component.rb +10 -0
- data/app/models/qdm/device_applied.rb +17 -0
- data/app/models/qdm/device_order.rb +14 -0
- data/app/models/qdm/device_recommended.rb +14 -0
- data/app/models/qdm/diagnosis.rb +15 -0
- data/app/models/qdm/diagnostic_study_order.rb +15 -0
- data/app/models/qdm/diagnostic_study_performed.rb +21 -0
- data/app/models/qdm/diagnostic_study_recommended.rb +15 -0
- data/app/models/qdm/encounter_order.rb +15 -0
- data/app/models/qdm/encounter_performed.rb +20 -0
- data/app/models/qdm/encounter_recommended.rb +15 -0
- data/app/models/qdm/facility_location.rb +10 -0
- data/app/models/qdm/family_history.rb +13 -0
- data/app/models/qdm/id.rb +10 -0
- data/app/models/qdm/immunization_administered.rb +18 -0
- data/app/models/qdm/immunization_order.rb +18 -0
- data/app/models/qdm/intervention_order.rb +14 -0
- data/app/models/qdm/intervention_performed.rb +17 -0
- data/app/models/qdm/intervention_recommended.rb +14 -0
- data/app/models/qdm/laboratory_test_order.rb +15 -0
- data/app/models/qdm/laboratory_test_performed.rb +21 -0
- data/app/models/qdm/laboratory_test_recommended.rb +15 -0
- data/app/models/qdm/medication_active.rb +16 -0
- data/app/models/qdm/medication_administered.rb +19 -0
- data/app/models/qdm/medication_discharge.rb +18 -0
- data/app/models/qdm/medication_dispensed.rb +19 -0
- data/app/models/qdm/medication_order.rb +22 -0
- data/app/models/qdm/participation.rb +9 -0
- data/app/models/qdm/patient.rb +201 -0
- data/app/models/qdm/patient_care_experience.rb +11 -0
- data/app/models/qdm/patient_characteristic.rb +11 -0
- data/app/models/qdm/patient_characteristic_birthdate.rb +12 -0
- data/app/models/qdm/patient_characteristic_clinical_trial_participant.rb +14 -0
- data/app/models/qdm/patient_characteristic_ethnicity.rb +11 -0
- data/app/models/qdm/patient_characteristic_expired.rb +13 -0
- data/app/models/qdm/patient_characteristic_payer.rb +12 -0
- data/app/models/qdm/patient_characteristic_race.rb +11 -0
- data/app/models/qdm/patient_characteristic_sex.rb +11 -0
- data/app/models/qdm/physical_exam_order.rb +16 -0
- data/app/models/qdm/physical_exam_performed.rb +19 -0
- data/app/models/qdm/physical_exam_recommended.rb +16 -0
- data/app/models/qdm/procedure_order.rb +18 -0
- data/app/models/qdm/procedure_performed.rb +23 -0
- data/app/models/qdm/procedure_recommended.rb +18 -0
- data/app/models/qdm/provider_care_experience.rb +11 -0
- data/app/models/qdm/provider_characteristic.rb +11 -0
- data/app/models/qdm/ratio.rb +10 -0
- data/app/models/qdm/result_component.rb +9 -0
- data/app/models/qdm/substance_administered.rb +18 -0
- data/app/models/qdm/substance_order.rb +20 -0
- data/app/models/qdm/substance_recommended.rb +20 -0
- data/app/models/qdm/symptom.rb +13 -0
- data/app/models/qdm/tacoma/concept.rb +14 -0
- data/app/models/qdm/tacoma/measure.rb +172 -0
- data/app/models/qdm/tacoma/measure_package.rb +10 -0
- data/app/models/qdm/tacoma/valueset.rb +68 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/bin/validate_dist.sh +17 -0
- data/config/mongoid.yml +6 -0
- data/cqm-models.gemspec +29 -0
- data/data/oids.json +584 -0
- data/dist/index.js +157647 -0
- data/lib/cqm/models.rb +1 -0
- data/lib/generate_models.rb +330 -0
- data/modelinfo/qdm-modelinfo-4.2.xml +515 -0
- data/modelinfo/qdm-modelinfo-4.3.xml +521 -0
- data/modelinfo/qdm-modelinfo-5.0.1.xml +436 -0
- data/modelinfo/qdm-modelinfo-5.0.2.xml +445 -0
- data/modelinfo/qdm-modelinfo-5.0.xml +429 -0
- data/modelinfo/qdm-modelinfo-5.3.xml +524 -0
- data/package.json +34 -0
- data/templates/all_data_elements_template.js.erb +4 -0
- data/templates/index_template.js.erb +12 -0
- data/templates/models_template.rb.erb +21 -0
- data/templates/mongoose_template.js.erb +20 -0
- data/templates/patient_extension.rb.erb +194 -0
- data/templates/patient_template.js.erb +247 -0
- data/tmp/.keep +0 -0
- data/yarn.lock +1901 -0
- metadata +320 -0
@@ -0,0 +1,25 @@
|
|
1
|
+
const mongoose = require('mongoose');
|
2
|
+
const { DataElementSchema } = require('./basetypes/DataElement');
|
3
|
+
const Code = require('./basetypes/Code');
|
4
|
+
const Interval = require('./basetypes/Interval');
|
5
|
+
const Quantity = require('./basetypes/Quantity');
|
6
|
+
const DateTime = require('./basetypes/DateTime');
|
7
|
+
|
8
|
+
const [Number, String] = [
|
9
|
+
mongoose.Schema.Types.Number,
|
10
|
+
mongoose.Schema.Types.String,
|
11
|
+
];
|
12
|
+
|
13
|
+
const CareGoalSchema = DataElementSchema({
|
14
|
+
relevantPeriod: Interval,
|
15
|
+
relatedTo: [String],
|
16
|
+
targetOutcome: {},
|
17
|
+
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.3.7' },
|
18
|
+
category: { type: String, default: 'care_goal' },
|
19
|
+
qdmVersion: { type: String, default: '5.3' },
|
20
|
+
_type: { type: String, default: 'CareGoal' },
|
21
|
+
|
22
|
+
});
|
23
|
+
|
24
|
+
module.exports.CareGoalSchema = CareGoalSchema;
|
25
|
+
module.exports.CareGoal = mongoose.model('CareGoal', CareGoalSchema);
|
@@ -0,0 +1,26 @@
|
|
1
|
+
const mongoose = require('mongoose');
|
2
|
+
const { DataElementSchema } = require('./basetypes/DataElement');
|
3
|
+
const Code = require('./basetypes/Code');
|
4
|
+
const Interval = require('./basetypes/Interval');
|
5
|
+
const Quantity = require('./basetypes/Quantity');
|
6
|
+
const DateTime = require('./basetypes/DateTime');
|
7
|
+
|
8
|
+
const [Number, String] = [
|
9
|
+
mongoose.Schema.Types.Number,
|
10
|
+
mongoose.Schema.Types.String,
|
11
|
+
];
|
12
|
+
|
13
|
+
const CommunicationFromPatientToProviderSchema = DataElementSchema({
|
14
|
+
authorDatetime: DateTime,
|
15
|
+
relatedTo: [String],
|
16
|
+
negationRationale: Code,
|
17
|
+
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.3.8' },
|
18
|
+
category: { type: String, default: 'communication' },
|
19
|
+
qdmStatus: { type: String, default: 'from_patient_to_provider' },
|
20
|
+
qdmVersion: { type: String, default: '5.3' },
|
21
|
+
_type: { type: String, default: 'CommunicationFromPatientToProvider' },
|
22
|
+
|
23
|
+
});
|
24
|
+
|
25
|
+
module.exports.CommunicationFromPatientToProviderSchema = CommunicationFromPatientToProviderSchema;
|
26
|
+
module.exports.CommunicationFromPatientToProvider = mongoose.model('CommunicationFromPatientToProvider', CommunicationFromPatientToProviderSchema);
|
@@ -0,0 +1,26 @@
|
|
1
|
+
const mongoose = require('mongoose');
|
2
|
+
const { DataElementSchema } = require('./basetypes/DataElement');
|
3
|
+
const Code = require('./basetypes/Code');
|
4
|
+
const Interval = require('./basetypes/Interval');
|
5
|
+
const Quantity = require('./basetypes/Quantity');
|
6
|
+
const DateTime = require('./basetypes/DateTime');
|
7
|
+
|
8
|
+
const [Number, String] = [
|
9
|
+
mongoose.Schema.Types.Number,
|
10
|
+
mongoose.Schema.Types.String,
|
11
|
+
];
|
12
|
+
|
13
|
+
const CommunicationFromProviderToPatientSchema = DataElementSchema({
|
14
|
+
authorDatetime: DateTime,
|
15
|
+
relatedTo: [String],
|
16
|
+
negationRationale: Code,
|
17
|
+
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.3.9' },
|
18
|
+
category: { type: String, default: 'communication' },
|
19
|
+
qdmStatus: { type: String, default: 'from_provider_to_patient' },
|
20
|
+
qdmVersion: { type: String, default: '5.3' },
|
21
|
+
_type: { type: String, default: 'CommunicationFromProviderToPatient' },
|
22
|
+
|
23
|
+
});
|
24
|
+
|
25
|
+
module.exports.CommunicationFromProviderToPatientSchema = CommunicationFromProviderToPatientSchema;
|
26
|
+
module.exports.CommunicationFromProviderToPatient = mongoose.model('CommunicationFromProviderToPatient', CommunicationFromProviderToPatientSchema);
|
@@ -0,0 +1,26 @@
|
|
1
|
+
const mongoose = require('mongoose');
|
2
|
+
const { DataElementSchema } = require('./basetypes/DataElement');
|
3
|
+
const Code = require('./basetypes/Code');
|
4
|
+
const Interval = require('./basetypes/Interval');
|
5
|
+
const Quantity = require('./basetypes/Quantity');
|
6
|
+
const DateTime = require('./basetypes/DateTime');
|
7
|
+
|
8
|
+
const [Number, String] = [
|
9
|
+
mongoose.Schema.Types.Number,
|
10
|
+
mongoose.Schema.Types.String,
|
11
|
+
];
|
12
|
+
|
13
|
+
const CommunicationFromProviderToProviderSchema = DataElementSchema({
|
14
|
+
authorDatetime: DateTime,
|
15
|
+
relatedTo: [String],
|
16
|
+
negationRationale: Code,
|
17
|
+
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.3.10' },
|
18
|
+
category: { type: String, default: 'communication' },
|
19
|
+
qdmStatus: { type: String, default: 'from_provider_to_provider' },
|
20
|
+
qdmVersion: { type: String, default: '5.3' },
|
21
|
+
_type: { type: String, default: 'CommunicationFromProviderToProvider' },
|
22
|
+
|
23
|
+
});
|
24
|
+
|
25
|
+
module.exports.CommunicationFromProviderToProviderSchema = CommunicationFromProviderToProviderSchema;
|
26
|
+
module.exports.CommunicationFromProviderToProvider = mongoose.model('CommunicationFromProviderToProvider', CommunicationFromProviderToProviderSchema);
|
@@ -0,0 +1,22 @@
|
|
1
|
+
const mongoose = require('mongoose');
|
2
|
+
const { DataElementSchema } = require('./basetypes/DataElement');
|
3
|
+
const Code = require('./basetypes/Code');
|
4
|
+
const Interval = require('./basetypes/Interval');
|
5
|
+
const Quantity = require('./basetypes/Quantity');
|
6
|
+
const DateTime = require('./basetypes/DateTime');
|
7
|
+
|
8
|
+
const [Number, String] = [
|
9
|
+
mongoose.Schema.Types.Number,
|
10
|
+
mongoose.Schema.Types.String,
|
11
|
+
];
|
12
|
+
|
13
|
+
const ComponentSchema = DataElementSchema({
|
14
|
+
code: Code,
|
15
|
+
result: {},
|
16
|
+
qdmVersion: { type: String, default: '5.3' },
|
17
|
+
_type: { type: String, default: 'Component' },
|
18
|
+
|
19
|
+
});
|
20
|
+
|
21
|
+
module.exports.ComponentSchema = ComponentSchema;
|
22
|
+
module.exports.Component = mongoose.model('Component', ComponentSchema);
|
@@ -0,0 +1,14 @@
|
|
1
|
+
const mongoose = require('mongoose');
|
2
|
+
|
3
|
+
const mString = mongoose.Schema.Types.String;
|
4
|
+
|
5
|
+
const ConceptSchema = mongoose.Schema({
|
6
|
+
code: mString,
|
7
|
+
code_system: mString,
|
8
|
+
code_system_name: mString,
|
9
|
+
code_system_version: mString,
|
10
|
+
display_name: mString,
|
11
|
+
});
|
12
|
+
|
13
|
+
module.exports.ConceptSchema = ConceptSchema;
|
14
|
+
module.exports.Concept = mongoose.model('concept', ConceptSchema);
|
@@ -0,0 +1,29 @@
|
|
1
|
+
const mongoose = require('mongoose');
|
2
|
+
const { DataElementSchema } = require('./basetypes/DataElement');
|
3
|
+
const Code = require('./basetypes/Code');
|
4
|
+
const Interval = require('./basetypes/Interval');
|
5
|
+
const Quantity = require('./basetypes/Quantity');
|
6
|
+
const DateTime = require('./basetypes/DateTime');
|
7
|
+
|
8
|
+
const [Number, String] = [
|
9
|
+
mongoose.Schema.Types.Number,
|
10
|
+
mongoose.Schema.Types.String,
|
11
|
+
];
|
12
|
+
|
13
|
+
const DeviceAppliedSchema = DataElementSchema({
|
14
|
+
authorDatetime: DateTime,
|
15
|
+
relevantPeriod: Interval,
|
16
|
+
negationRationale: Code,
|
17
|
+
reason: Code,
|
18
|
+
anatomicalLocationSite: Code,
|
19
|
+
anatomicalApproachSite: Code,
|
20
|
+
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.3.13' },
|
21
|
+
category: { type: String, default: 'device' },
|
22
|
+
qdmStatus: { type: String, default: 'applied' },
|
23
|
+
qdmVersion: { type: String, default: '5.3' },
|
24
|
+
_type: { type: String, default: 'DeviceApplied' },
|
25
|
+
|
26
|
+
});
|
27
|
+
|
28
|
+
module.exports.DeviceAppliedSchema = DeviceAppliedSchema;
|
29
|
+
module.exports.DeviceApplied = mongoose.model('DeviceApplied', DeviceAppliedSchema);
|
@@ -0,0 +1,26 @@
|
|
1
|
+
const mongoose = require('mongoose');
|
2
|
+
const { DataElementSchema } = require('./basetypes/DataElement');
|
3
|
+
const Code = require('./basetypes/Code');
|
4
|
+
const Interval = require('./basetypes/Interval');
|
5
|
+
const Quantity = require('./basetypes/Quantity');
|
6
|
+
const DateTime = require('./basetypes/DateTime');
|
7
|
+
|
8
|
+
const [Number, String] = [
|
9
|
+
mongoose.Schema.Types.Number,
|
10
|
+
mongoose.Schema.Types.String,
|
11
|
+
];
|
12
|
+
|
13
|
+
const DeviceOrderSchema = DataElementSchema({
|
14
|
+
authorDatetime: DateTime,
|
15
|
+
negationRationale: Code,
|
16
|
+
reason: Code,
|
17
|
+
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.3.15' },
|
18
|
+
category: { type: String, default: 'device' },
|
19
|
+
qdmStatus: { type: String, default: 'order' },
|
20
|
+
qdmVersion: { type: String, default: '5.3' },
|
21
|
+
_type: { type: String, default: 'DeviceOrder' },
|
22
|
+
|
23
|
+
});
|
24
|
+
|
25
|
+
module.exports.DeviceOrderSchema = DeviceOrderSchema;
|
26
|
+
module.exports.DeviceOrder = mongoose.model('DeviceOrder', DeviceOrderSchema);
|
@@ -0,0 +1,26 @@
|
|
1
|
+
const mongoose = require('mongoose');
|
2
|
+
const { DataElementSchema } = require('./basetypes/DataElement');
|
3
|
+
const Code = require('./basetypes/Code');
|
4
|
+
const Interval = require('./basetypes/Interval');
|
5
|
+
const Quantity = require('./basetypes/Quantity');
|
6
|
+
const DateTime = require('./basetypes/DateTime');
|
7
|
+
|
8
|
+
const [Number, String] = [
|
9
|
+
mongoose.Schema.Types.Number,
|
10
|
+
mongoose.Schema.Types.String,
|
11
|
+
];
|
12
|
+
|
13
|
+
const DeviceRecommendedSchema = DataElementSchema({
|
14
|
+
authorDatetime: DateTime,
|
15
|
+
negationRationale: Code,
|
16
|
+
reason: Code,
|
17
|
+
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.3.16' },
|
18
|
+
category: { type: String, default: 'device' },
|
19
|
+
qdmStatus: { type: String, default: 'recommended' },
|
20
|
+
qdmVersion: { type: String, default: '5.3' },
|
21
|
+
_type: { type: String, default: 'DeviceRecommended' },
|
22
|
+
|
23
|
+
});
|
24
|
+
|
25
|
+
module.exports.DeviceRecommendedSchema = DeviceRecommendedSchema;
|
26
|
+
module.exports.DeviceRecommended = mongoose.model('DeviceRecommended', DeviceRecommendedSchema);
|
@@ -0,0 +1,27 @@
|
|
1
|
+
const mongoose = require('mongoose');
|
2
|
+
const { DataElementSchema } = require('./basetypes/DataElement');
|
3
|
+
const Code = require('./basetypes/Code');
|
4
|
+
const Interval = require('./basetypes/Interval');
|
5
|
+
const Quantity = require('./basetypes/Quantity');
|
6
|
+
const DateTime = require('./basetypes/DateTime');
|
7
|
+
|
8
|
+
const [Number, String] = [
|
9
|
+
mongoose.Schema.Types.Number,
|
10
|
+
mongoose.Schema.Types.String,
|
11
|
+
];
|
12
|
+
|
13
|
+
const DiagnosisSchema = DataElementSchema({
|
14
|
+
authorDatetime: DateTime,
|
15
|
+
prevalencePeriod: Interval,
|
16
|
+
anatomicalLocationSite: Code,
|
17
|
+
severity: Code,
|
18
|
+
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.3.110' },
|
19
|
+
qrdaOid: { type: String, default: '2.16.840.1.113883.10.20.24.3.135' },
|
20
|
+
category: { type: String, default: 'condition' },
|
21
|
+
qdmVersion: { type: String, default: '5.3' },
|
22
|
+
_type: { type: String, default: 'Diagnosis' },
|
23
|
+
|
24
|
+
});
|
25
|
+
|
26
|
+
module.exports.DiagnosisSchema = DiagnosisSchema;
|
27
|
+
module.exports.Diagnosis = mongoose.model('Diagnosis', DiagnosisSchema);
|
@@ -0,0 +1,27 @@
|
|
1
|
+
const mongoose = require('mongoose');
|
2
|
+
const { DataElementSchema } = require('./basetypes/DataElement');
|
3
|
+
const Code = require('./basetypes/Code');
|
4
|
+
const Interval = require('./basetypes/Interval');
|
5
|
+
const Quantity = require('./basetypes/Quantity');
|
6
|
+
const DateTime = require('./basetypes/DateTime');
|
7
|
+
|
8
|
+
const [Number, String] = [
|
9
|
+
mongoose.Schema.Types.Number,
|
10
|
+
mongoose.Schema.Types.String,
|
11
|
+
];
|
12
|
+
|
13
|
+
const DiagnosticStudyOrderSchema = DataElementSchema({
|
14
|
+
authorDatetime: DateTime,
|
15
|
+
reason: Code,
|
16
|
+
method: Code,
|
17
|
+
negationRationale: Code,
|
18
|
+
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.3.22' },
|
19
|
+
category: { type: String, default: 'diagnostic_study' },
|
20
|
+
qdmStatus: { type: String, default: 'order' },
|
21
|
+
qdmVersion: { type: String, default: '5.3' },
|
22
|
+
_type: { type: String, default: 'DiagnosticStudyOrder' },
|
23
|
+
|
24
|
+
});
|
25
|
+
|
26
|
+
module.exports.DiagnosticStudyOrderSchema = DiagnosticStudyOrderSchema;
|
27
|
+
module.exports.DiagnosticStudyOrder = mongoose.model('DiagnosticStudyOrder', DiagnosticStudyOrderSchema);
|
@@ -0,0 +1,33 @@
|
|
1
|
+
const mongoose = require('mongoose');
|
2
|
+
const { DataElementSchema } = require('./basetypes/DataElement');
|
3
|
+
const Code = require('./basetypes/Code');
|
4
|
+
const Interval = require('./basetypes/Interval');
|
5
|
+
const Quantity = require('./basetypes/Quantity');
|
6
|
+
const DateTime = require('./basetypes/DateTime');
|
7
|
+
|
8
|
+
const [Number, String] = [
|
9
|
+
mongoose.Schema.Types.Number,
|
10
|
+
mongoose.Schema.Types.String,
|
11
|
+
];
|
12
|
+
|
13
|
+
const DiagnosticStudyPerformedSchema = DataElementSchema({
|
14
|
+
authorDatetime: DateTime,
|
15
|
+
relevantPeriod: Interval,
|
16
|
+
reason: Code,
|
17
|
+
result: {},
|
18
|
+
resultDatetime: DateTime,
|
19
|
+
status: Code,
|
20
|
+
method: Code,
|
21
|
+
facilityLocation: Code,
|
22
|
+
negationRationale: Code,
|
23
|
+
components: [],
|
24
|
+
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.3.23' },
|
25
|
+
category: { type: String, default: 'diagnostic_study' },
|
26
|
+
qdmStatus: { type: String, default: 'performed' },
|
27
|
+
qdmVersion: { type: String, default: '5.3' },
|
28
|
+
_type: { type: String, default: 'DiagnosticStudyPerformed' },
|
29
|
+
|
30
|
+
});
|
31
|
+
|
32
|
+
module.exports.DiagnosticStudyPerformedSchema = DiagnosticStudyPerformedSchema;
|
33
|
+
module.exports.DiagnosticStudyPerformed = mongoose.model('DiagnosticStudyPerformed', DiagnosticStudyPerformedSchema);
|
@@ -0,0 +1,27 @@
|
|
1
|
+
const mongoose = require('mongoose');
|
2
|
+
const { DataElementSchema } = require('./basetypes/DataElement');
|
3
|
+
const Code = require('./basetypes/Code');
|
4
|
+
const Interval = require('./basetypes/Interval');
|
5
|
+
const Quantity = require('./basetypes/Quantity');
|
6
|
+
const DateTime = require('./basetypes/DateTime');
|
7
|
+
|
8
|
+
const [Number, String] = [
|
9
|
+
mongoose.Schema.Types.Number,
|
10
|
+
mongoose.Schema.Types.String,
|
11
|
+
];
|
12
|
+
|
13
|
+
const DiagnosticStudyRecommendedSchema = DataElementSchema({
|
14
|
+
authorDatetime: DateTime,
|
15
|
+
method: Code,
|
16
|
+
negationRationale: Code,
|
17
|
+
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.3.24' },
|
18
|
+
qrdaOid: { type: String, default: '2.16.840.1.113883.10.20.24.3.19' },
|
19
|
+
category: { type: String, default: 'diagnostic_study' },
|
20
|
+
qdmStatus: { type: String, default: 'recommended' },
|
21
|
+
qdmVersion: { type: String, default: '5.3' },
|
22
|
+
_type: { type: String, default: 'DiagnosticStudyRecommended' },
|
23
|
+
|
24
|
+
});
|
25
|
+
|
26
|
+
module.exports.DiagnosticStudyRecommendedSchema = DiagnosticStudyRecommendedSchema;
|
27
|
+
module.exports.DiagnosticStudyRecommended = mongoose.model('DiagnosticStudyRecommended', DiagnosticStudyRecommendedSchema);
|
@@ -0,0 +1,27 @@
|
|
1
|
+
const mongoose = require('mongoose');
|
2
|
+
const { DataElementSchema } = require('./basetypes/DataElement');
|
3
|
+
const Code = require('./basetypes/Code');
|
4
|
+
const Interval = require('./basetypes/Interval');
|
5
|
+
const Quantity = require('./basetypes/Quantity');
|
6
|
+
const DateTime = require('./basetypes/DateTime');
|
7
|
+
|
8
|
+
const [Number, String] = [
|
9
|
+
mongoose.Schema.Types.Number,
|
10
|
+
mongoose.Schema.Types.String,
|
11
|
+
];
|
12
|
+
|
13
|
+
const EncounterOrderSchema = DataElementSchema({
|
14
|
+
authorDatetime: DateTime,
|
15
|
+
reason: Code,
|
16
|
+
facilityLocation: Code,
|
17
|
+
negationRationale: Code,
|
18
|
+
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.3.27' },
|
19
|
+
category: { type: String, default: 'encounter' },
|
20
|
+
qdmStatus: { type: String, default: 'order' },
|
21
|
+
qdmVersion: { type: String, default: '5.3' },
|
22
|
+
_type: { type: String, default: 'EncounterOrder' },
|
23
|
+
|
24
|
+
});
|
25
|
+
|
26
|
+
module.exports.EncounterOrderSchema = EncounterOrderSchema;
|
27
|
+
module.exports.EncounterOrder = mongoose.model('EncounterOrder', EncounterOrderSchema);
|
@@ -0,0 +1,32 @@
|
|
1
|
+
const mongoose = require('mongoose');
|
2
|
+
const { DataElementSchema } = require('./basetypes/DataElement');
|
3
|
+
const Code = require('./basetypes/Code');
|
4
|
+
const Interval = require('./basetypes/Interval');
|
5
|
+
const Quantity = require('./basetypes/Quantity');
|
6
|
+
const DateTime = require('./basetypes/DateTime');
|
7
|
+
|
8
|
+
const [Number, String] = [
|
9
|
+
mongoose.Schema.Types.Number,
|
10
|
+
mongoose.Schema.Types.String,
|
11
|
+
];
|
12
|
+
|
13
|
+
const EncounterPerformedSchema = DataElementSchema({
|
14
|
+
authorDatetime: DateTime,
|
15
|
+
admissionSource: Code,
|
16
|
+
relevantPeriod: Interval,
|
17
|
+
dischargeDisposition: Code,
|
18
|
+
facilityLocations: [],
|
19
|
+
diagnoses: [Code],
|
20
|
+
principalDiagnosis: Code,
|
21
|
+
negationRationale: Code,
|
22
|
+
lengthOfStay: Quantity,
|
23
|
+
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.3.5' },
|
24
|
+
category: { type: String, default: 'encounter' },
|
25
|
+
qdmStatus: { type: String, default: 'performed' },
|
26
|
+
qdmVersion: { type: String, default: '5.3' },
|
27
|
+
_type: { type: String, default: 'EncounterPerformed' },
|
28
|
+
|
29
|
+
});
|
30
|
+
|
31
|
+
module.exports.EncounterPerformedSchema = EncounterPerformedSchema;
|
32
|
+
module.exports.EncounterPerformed = mongoose.model('EncounterPerformed', EncounterPerformedSchema);
|
@@ -0,0 +1,27 @@
|
|
1
|
+
const mongoose = require('mongoose');
|
2
|
+
const { DataElementSchema } = require('./basetypes/DataElement');
|
3
|
+
const Code = require('./basetypes/Code');
|
4
|
+
const Interval = require('./basetypes/Interval');
|
5
|
+
const Quantity = require('./basetypes/Quantity');
|
6
|
+
const DateTime = require('./basetypes/DateTime');
|
7
|
+
|
8
|
+
const [Number, String] = [
|
9
|
+
mongoose.Schema.Types.Number,
|
10
|
+
mongoose.Schema.Types.String,
|
11
|
+
];
|
12
|
+
|
13
|
+
const EncounterRecommendedSchema = DataElementSchema({
|
14
|
+
authorDatetime: DateTime,
|
15
|
+
reason: Code,
|
16
|
+
facilityLocation: Code,
|
17
|
+
negationRationale: Code,
|
18
|
+
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.3.28' },
|
19
|
+
category: { type: String, default: 'encounter' },
|
20
|
+
qdmStatus: { type: String, default: 'recommended' },
|
21
|
+
qdmVersion: { type: String, default: '5.3' },
|
22
|
+
_type: { type: String, default: 'EncounterRecommended' },
|
23
|
+
|
24
|
+
});
|
25
|
+
|
26
|
+
module.exports.EncounterRecommendedSchema = EncounterRecommendedSchema;
|
27
|
+
module.exports.EncounterRecommended = mongoose.model('EncounterRecommended', EncounterRecommendedSchema);
|
@@ -0,0 +1,22 @@
|
|
1
|
+
const mongoose = require('mongoose');
|
2
|
+
const { DataElementSchema } = require('./basetypes/DataElement');
|
3
|
+
const Code = require('./basetypes/Code');
|
4
|
+
const Interval = require('./basetypes/Interval');
|
5
|
+
const Quantity = require('./basetypes/Quantity');
|
6
|
+
const DateTime = require('./basetypes/DateTime');
|
7
|
+
|
8
|
+
const [Number, String] = [
|
9
|
+
mongoose.Schema.Types.Number,
|
10
|
+
mongoose.Schema.Types.String,
|
11
|
+
];
|
12
|
+
|
13
|
+
const FacilityLocationSchema = DataElementSchema({
|
14
|
+
code: Code,
|
15
|
+
locationPeriod: Interval,
|
16
|
+
qdmVersion: { type: String, default: '5.3' },
|
17
|
+
_type: { type: String, default: 'FacilityLocation' },
|
18
|
+
|
19
|
+
});
|
20
|
+
|
21
|
+
module.exports.FacilityLocationSchema = FacilityLocationSchema;
|
22
|
+
module.exports.FacilityLocation = mongoose.model('FacilityLocation', FacilityLocationSchema);
|
@@ -0,0 +1,25 @@
|
|
1
|
+
const mongoose = require('mongoose');
|
2
|
+
const { DataElementSchema } = require('./basetypes/DataElement');
|
3
|
+
const Code = require('./basetypes/Code');
|
4
|
+
const Interval = require('./basetypes/Interval');
|
5
|
+
const Quantity = require('./basetypes/Quantity');
|
6
|
+
const DateTime = require('./basetypes/DateTime');
|
7
|
+
|
8
|
+
const [Number, String] = [
|
9
|
+
mongoose.Schema.Types.Number,
|
10
|
+
mongoose.Schema.Types.String,
|
11
|
+
];
|
12
|
+
|
13
|
+
const FamilyHistorySchema = DataElementSchema({
|
14
|
+
authorDatetime: DateTime,
|
15
|
+
relationship: Code,
|
16
|
+
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.3.111' },
|
17
|
+
qrdaOid: { type: String, default: '2.16.840.1.113883.10.20.24.3.12' },
|
18
|
+
category: { type: String, default: 'family_history' },
|
19
|
+
qdmVersion: { type: String, default: '5.3' },
|
20
|
+
_type: { type: String, default: 'FamilyHistory' },
|
21
|
+
|
22
|
+
});
|
23
|
+
|
24
|
+
module.exports.FamilyHistorySchema = FamilyHistorySchema;
|
25
|
+
module.exports.FamilyHistory = mongoose.model('FamilyHistory', FamilyHistorySchema);
|
@@ -0,0 +1,22 @@
|
|
1
|
+
const mongoose = require('mongoose');
|
2
|
+
const { DataElementSchema } = require('./basetypes/DataElement');
|
3
|
+
const Code = require('./basetypes/Code');
|
4
|
+
const Interval = require('./basetypes/Interval');
|
5
|
+
const Quantity = require('./basetypes/Quantity');
|
6
|
+
const DateTime = require('./basetypes/DateTime');
|
7
|
+
|
8
|
+
const [Number, String] = [
|
9
|
+
mongoose.Schema.Types.Number,
|
10
|
+
mongoose.Schema.Types.String,
|
11
|
+
];
|
12
|
+
|
13
|
+
const IdSchema = DataElementSchema({
|
14
|
+
namingSystem: String,
|
15
|
+
value: String,
|
16
|
+
qdmVersion: { type: String, default: '5.3' },
|
17
|
+
_type: { type: String, default: 'Id' },
|
18
|
+
|
19
|
+
});
|
20
|
+
|
21
|
+
module.exports.IdSchema = IdSchema;
|
22
|
+
module.exports.Id = mongoose.model('Id', IdSchema);
|
@@ -0,0 +1,30 @@
|
|
1
|
+
const mongoose = require('mongoose');
|
2
|
+
const { DataElementSchema } = require('./basetypes/DataElement');
|
3
|
+
const Code = require('./basetypes/Code');
|
4
|
+
const Interval = require('./basetypes/Interval');
|
5
|
+
const Quantity = require('./basetypes/Quantity');
|
6
|
+
const DateTime = require('./basetypes/DateTime');
|
7
|
+
|
8
|
+
const [Number, String] = [
|
9
|
+
mongoose.Schema.Types.Number,
|
10
|
+
mongoose.Schema.Types.String,
|
11
|
+
];
|
12
|
+
|
13
|
+
const ImmunizationAdministeredSchema = DataElementSchema({
|
14
|
+
authorDatetime: DateTime,
|
15
|
+
reason: Code,
|
16
|
+
dosage: Quantity,
|
17
|
+
supply: Quantity,
|
18
|
+
route: Code,
|
19
|
+
negationRationale: Code,
|
20
|
+
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.3.112' },
|
21
|
+
qrdaOid: { type: String, default: '2.16.840.1.113883.10.20.24.3.140' },
|
22
|
+
category: { type: String, default: 'immunization' },
|
23
|
+
qdmStatus: { type: String, default: 'administered' },
|
24
|
+
qdmVersion: { type: String, default: '5.3' },
|
25
|
+
_type: { type: String, default: 'ImmunizationAdministered' },
|
26
|
+
|
27
|
+
});
|
28
|
+
|
29
|
+
module.exports.ImmunizationAdministeredSchema = ImmunizationAdministeredSchema;
|
30
|
+
module.exports.ImmunizationAdministered = mongoose.model('ImmunizationAdministered', ImmunizationAdministeredSchema);
|
@@ -0,0 +1,30 @@
|
|
1
|
+
const mongoose = require('mongoose');
|
2
|
+
const { DataElementSchema } = require('./basetypes/DataElement');
|
3
|
+
const Code = require('./basetypes/Code');
|
4
|
+
const Interval = require('./basetypes/Interval');
|
5
|
+
const Quantity = require('./basetypes/Quantity');
|
6
|
+
const DateTime = require('./basetypes/DateTime');
|
7
|
+
|
8
|
+
const [Number, String] = [
|
9
|
+
mongoose.Schema.Types.Number,
|
10
|
+
mongoose.Schema.Types.String,
|
11
|
+
];
|
12
|
+
|
13
|
+
const ImmunizationOrderSchema = DataElementSchema({
|
14
|
+
activeDatetime: DateTime,
|
15
|
+
authorDatetime: DateTime,
|
16
|
+
dosage: Quantity,
|
17
|
+
supply: Quantity,
|
18
|
+
reason: Code,
|
19
|
+
route: Code,
|
20
|
+
negationRationale: Code,
|
21
|
+
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.3.113' },
|
22
|
+
category: { type: String, default: 'immunization' },
|
23
|
+
qdmStatus: { type: String, default: 'order' },
|
24
|
+
qdmVersion: { type: String, default: '5.3' },
|
25
|
+
_type: { type: String, default: 'ImmunizationOrder' },
|
26
|
+
|
27
|
+
});
|
28
|
+
|
29
|
+
module.exports.ImmunizationOrderSchema = ImmunizationOrderSchema;
|
30
|
+
module.exports.ImmunizationOrder = mongoose.model('ImmunizationOrder', ImmunizationOrderSchema);
|
@@ -0,0 +1,26 @@
|
|
1
|
+
const mongoose = require('mongoose');
|
2
|
+
const { DataElementSchema } = require('./basetypes/DataElement');
|
3
|
+
const Code = require('./basetypes/Code');
|
4
|
+
const Interval = require('./basetypes/Interval');
|
5
|
+
const Quantity = require('./basetypes/Quantity');
|
6
|
+
const DateTime = require('./basetypes/DateTime');
|
7
|
+
|
8
|
+
const [Number, String] = [
|
9
|
+
mongoose.Schema.Types.Number,
|
10
|
+
mongoose.Schema.Types.String,
|
11
|
+
];
|
12
|
+
|
13
|
+
const InterventionOrderSchema = DataElementSchema({
|
14
|
+
authorDatetime: DateTime,
|
15
|
+
reason: Code,
|
16
|
+
negationRationale: Code,
|
17
|
+
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.3.35' },
|
18
|
+
category: { type: String, default: 'intervention' },
|
19
|
+
qdmStatus: { type: String, default: 'order' },
|
20
|
+
qdmVersion: { type: String, default: '5.3' },
|
21
|
+
_type: { type: String, default: 'InterventionOrder' },
|
22
|
+
|
23
|
+
});
|
24
|
+
|
25
|
+
module.exports.InterventionOrderSchema = InterventionOrderSchema;
|
26
|
+
module.exports.InterventionOrder = mongoose.model('InterventionOrder', InterventionOrderSchema);
|
@@ -0,0 +1,29 @@
|
|
1
|
+
const mongoose = require('mongoose');
|
2
|
+
const { DataElementSchema } = require('./basetypes/DataElement');
|
3
|
+
const Code = require('./basetypes/Code');
|
4
|
+
const Interval = require('./basetypes/Interval');
|
5
|
+
const Quantity = require('./basetypes/Quantity');
|
6
|
+
const DateTime = require('./basetypes/DateTime');
|
7
|
+
|
8
|
+
const [Number, String] = [
|
9
|
+
mongoose.Schema.Types.Number,
|
10
|
+
mongoose.Schema.Types.String,
|
11
|
+
];
|
12
|
+
|
13
|
+
const InterventionPerformedSchema = DataElementSchema({
|
14
|
+
authorDatetime: DateTime,
|
15
|
+
relevantPeriod: Interval,
|
16
|
+
reason: Code,
|
17
|
+
result: {},
|
18
|
+
status: Code,
|
19
|
+
negationRationale: Code,
|
20
|
+
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.3.36' },
|
21
|
+
category: { type: String, default: 'intervention' },
|
22
|
+
qdmStatus: { type: String, default: 'performed' },
|
23
|
+
qdmVersion: { type: String, default: '5.3' },
|
24
|
+
_type: { type: String, default: 'InterventionPerformed' },
|
25
|
+
|
26
|
+
});
|
27
|
+
|
28
|
+
module.exports.InterventionPerformedSchema = InterventionPerformedSchema;
|
29
|
+
module.exports.InterventionPerformed = mongoose.model('InterventionPerformed', InterventionPerformedSchema);
|
@@ -0,0 +1,26 @@
|
|
1
|
+
const mongoose = require('mongoose');
|
2
|
+
const { DataElementSchema } = require('./basetypes/DataElement');
|
3
|
+
const Code = require('./basetypes/Code');
|
4
|
+
const Interval = require('./basetypes/Interval');
|
5
|
+
const Quantity = require('./basetypes/Quantity');
|
6
|
+
const DateTime = require('./basetypes/DateTime');
|
7
|
+
|
8
|
+
const [Number, String] = [
|
9
|
+
mongoose.Schema.Types.Number,
|
10
|
+
mongoose.Schema.Types.String,
|
11
|
+
];
|
12
|
+
|
13
|
+
const InterventionRecommendedSchema = DataElementSchema({
|
14
|
+
authorDatetime: DateTime,
|
15
|
+
reason: Code,
|
16
|
+
negationRationale: Code,
|
17
|
+
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.3.37' },
|
18
|
+
category: { type: String, default: 'intervention' },
|
19
|
+
qdmStatus: { type: String, default: 'recommended' },
|
20
|
+
qdmVersion: { type: String, default: '5.3' },
|
21
|
+
_type: { type: String, default: 'InterventionRecommended' },
|
22
|
+
|
23
|
+
});
|
24
|
+
|
25
|
+
module.exports.InterventionRecommendedSchema = InterventionRecommendedSchema;
|
26
|
+
module.exports.InterventionRecommended = mongoose.model('InterventionRecommended', InterventionRecommendedSchema);
|