cqm-models 3.0.6 → 4.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.eslintrc.json +6 -0
- data/.github/workflows/ci.yml +56 -0
- data/README.md +3 -2
- data/app/assets/javascripts/AdverseEvent.js +2 -2
- data/app/assets/javascripts/AllDataElements.js +2 -2
- data/app/assets/javascripts/AllergyIntolerance.js +2 -2
- data/app/assets/javascripts/AssessmentOrder.js +2 -2
- data/app/assets/javascripts/AssessmentPerformed.js +3 -2
- data/app/assets/javascripts/AssessmentRecommended.js +2 -2
- data/app/assets/javascripts/CareGoal.js +2 -2
- data/app/assets/javascripts/CommunicationPerformed.js +3 -3
- data/app/assets/javascripts/DeviceOrder.js +2 -2
- data/app/assets/javascripts/DeviceRecommended.js +2 -2
- data/app/assets/javascripts/Diagnosis.js +2 -2
- data/app/assets/javascripts/DiagnosticStudyOrder.js +2 -2
- data/app/assets/javascripts/DiagnosticStudyPerformed.js +4 -2
- data/app/assets/javascripts/DiagnosticStudyRecommended.js +2 -2
- data/app/assets/javascripts/EncounterOrder.js +2 -2
- data/app/assets/javascripts/EncounterPerformed.js +7 -3
- data/app/assets/javascripts/EncounterRecommended.js +2 -2
- data/app/assets/javascripts/FamilyHistory.js +2 -2
- data/app/assets/javascripts/ImmunizationAdministered.js +2 -2
- data/app/assets/javascripts/ImmunizationOrder.js +2 -2
- data/app/assets/javascripts/InterventionOrder.js +2 -2
- data/app/assets/javascripts/InterventionPerformed.js +3 -2
- data/app/assets/javascripts/InterventionRecommended.js +2 -2
- data/app/assets/javascripts/LaboratoryTestOrder.js +2 -2
- data/app/assets/javascripts/LaboratoryTestPerformed.js +4 -2
- data/app/assets/javascripts/LaboratoryTestRecommended.js +2 -2
- data/app/assets/javascripts/MedicationActive.js +2 -2
- data/app/assets/javascripts/MedicationAdministered.js +2 -2
- data/app/assets/javascripts/MedicationDischarge.js +3 -3
- data/app/assets/javascripts/MedicationDispensed.js +4 -3
- data/app/assets/javascripts/MedicationOrder.js +3 -2
- data/app/assets/javascripts/Participation.js +1 -2
- data/app/assets/javascripts/PatientCareExperience.js +2 -2
- data/app/assets/javascripts/PatientCharacteristic.js +1 -1
- data/app/assets/javascripts/PatientCharacteristicBirthdate.js +1 -1
- data/app/assets/javascripts/PatientCharacteristicClinicalTrialParticipant.js +1 -1
- data/app/assets/javascripts/PatientCharacteristicEthnicity.js +1 -1
- data/app/assets/javascripts/PatientCharacteristicExpired.js +1 -1
- data/app/assets/javascripts/PatientCharacteristicPayer.js +1 -1
- data/app/assets/javascripts/PatientCharacteristicRace.js +1 -1
- data/app/assets/javascripts/PatientCharacteristicSex.js +1 -1
- data/app/assets/javascripts/PhysicalExamOrder.js +2 -2
- data/app/assets/javascripts/PhysicalExamPerformed.js +3 -2
- data/app/assets/javascripts/PhysicalExamRecommended.js +2 -2
- data/app/assets/javascripts/ProcedureOrder.js +2 -2
- data/app/assets/javascripts/ProcedurePerformed.js +3 -3
- data/app/assets/javascripts/ProcedureRecommended.js +2 -2
- data/app/assets/javascripts/ProviderCareExperience.js +2 -2
- data/app/assets/javascripts/QDMPatient.js +25 -1
- data/app/assets/javascripts/RelatedPerson.js +1 -1
- data/app/assets/javascripts/SubstanceAdministered.js +2 -2
- data/app/assets/javascripts/SubstanceOrder.js +2 -2
- data/app/assets/javascripts/SubstanceRecommended.js +2 -2
- data/app/assets/javascripts/Symptom.js +2 -2
- data/app/assets/javascripts/attributes/Component.js +2 -2
- data/app/assets/javascripts/attributes/DiagnosisComponent.js +1 -1
- data/app/assets/javascripts/attributes/Entity.js +2 -2
- data/app/assets/javascripts/attributes/FacilityLocation.js +1 -1
- data/app/assets/javascripts/attributes/Identifier.js +1 -1
- data/app/assets/javascripts/attributes/Location.js +32 -0
- data/app/assets/javascripts/attributes/Organization.js +1 -1
- data/app/assets/javascripts/basetypes/AnyEntity.js +3 -0
- data/app/assets/javascripts/basetypes/DataElement.js +25 -1
- data/app/models/hqmfOid_to_datatype_map.json +1 -1
- data/app/models/models.rb +2 -2
- data/app/models/qdm/adverse_event.rb +2 -2
- data/app/models/qdm/allergy_intolerance.rb +2 -2
- data/app/models/qdm/assessment_order.rb +2 -2
- data/app/models/qdm/assessment_performed.rb +3 -2
- data/app/models/qdm/assessment_recommended.rb +2 -2
- data/app/models/qdm/attributes/component.rb +1 -1
- data/app/models/qdm/attributes/diagnosis_component.rb +1 -1
- data/app/models/qdm/attributes/entity.rb +1 -1
- data/app/models/qdm/attributes/facility_location.rb +1 -1
- data/app/models/qdm/attributes/identifier.rb +1 -1
- data/app/models/qdm/attributes/location.rb +9 -0
- data/app/models/qdm/attributes/organization.rb +1 -1
- data/app/models/qdm/basetypes/data_element.rb +5 -0
- data/app/models/qdm/care_goal.rb +2 -2
- data/app/models/qdm/communication_performed.rb +3 -3
- data/app/models/qdm/device_order.rb +2 -2
- data/app/models/qdm/device_recommended.rb +2 -2
- data/app/models/qdm/diagnosis.rb +2 -2
- data/app/models/qdm/diagnostic_study_order.rb +2 -2
- data/app/models/qdm/diagnostic_study_performed.rb +4 -2
- data/app/models/qdm/diagnostic_study_recommended.rb +2 -2
- data/app/models/qdm/encounter_order.rb +2 -2
- data/app/models/qdm/encounter_performed.rb +4 -3
- data/app/models/qdm/encounter_recommended.rb +2 -2
- data/app/models/qdm/family_history.rb +2 -2
- data/app/models/qdm/immunization_administered.rb +2 -2
- data/app/models/qdm/immunization_order.rb +2 -2
- data/app/models/qdm/intervention_order.rb +2 -2
- data/app/models/qdm/intervention_performed.rb +3 -2
- data/app/models/qdm/intervention_recommended.rb +2 -2
- data/app/models/qdm/laboratory_test_order.rb +2 -2
- data/app/models/qdm/laboratory_test_performed.rb +4 -2
- data/app/models/qdm/laboratory_test_recommended.rb +2 -2
- data/app/models/qdm/medication_active.rb +2 -2
- data/app/models/qdm/medication_administered.rb +2 -2
- data/app/models/qdm/medication_discharge.rb +3 -3
- data/app/models/qdm/medication_dispensed.rb +4 -3
- data/app/models/qdm/medication_order.rb +3 -2
- data/app/models/qdm/participation.rb +1 -2
- data/app/models/qdm/patient.rb +1 -1
- data/app/models/qdm/patient_care_experience.rb +2 -2
- data/app/models/qdm/patient_characteristic.rb +1 -1
- data/app/models/qdm/patient_characteristic_birthdate.rb +1 -1
- data/app/models/qdm/patient_characteristic_clinical_trial_participant.rb +1 -1
- data/app/models/qdm/patient_characteristic_ethnicity.rb +1 -1
- data/app/models/qdm/patient_characteristic_expired.rb +1 -1
- data/app/models/qdm/patient_characteristic_payer.rb +1 -1
- data/app/models/qdm/patient_characteristic_race.rb +1 -1
- data/app/models/qdm/patient_characteristic_sex.rb +1 -1
- data/app/models/qdm/physical_exam_order.rb +2 -2
- data/app/models/qdm/physical_exam_performed.rb +3 -2
- data/app/models/qdm/physical_exam_recommended.rb +2 -2
- data/app/models/qdm/procedure_order.rb +2 -2
- data/app/models/qdm/procedure_performed.rb +3 -3
- data/app/models/qdm/procedure_recommended.rb +2 -2
- data/app/models/qdm/provider_care_experience.rb +2 -2
- data/app/models/qdm/related_person.rb +1 -1
- data/app/models/qdm/substance_administered.rb +2 -2
- data/app/models/qdm/substance_order.rb +2 -2
- data/app/models/qdm/substance_recommended.rb +2 -2
- data/app/models/qdm/symptom.rb +2 -2
- data/bin/validate_generator.sh +2 -2
- data/cqm-models.gemspec +1 -1
- data/data/oids_qdm_5.6.json +335 -0
- data/dist/browser.js +61618 -94314
- data/dist/index.js +61618 -94314
- data/lib/generate_entities.rb +18 -10
- data/lib/generate_models.rb +28 -20
- data/lib/generate_patients.rb +1 -1
- data/modelinfo/qdm-modelinfo-5.6.xml +1102 -0
- data/package.json +5 -5
- data/templates/models_template.rb.erb +3 -1
- data/templates/mongoose_template.js.erb +9 -2
- data/templates/patient_template.js.erb +48 -4
- data/yarn.lock +1019 -827
- metadata +12 -10
- data/.travis.yml +0 -52
- data/app/assets/javascripts/DeviceApplied.js +0 -48
- data/app/models/qdm/device_applied.rb +0 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f8d38da5e177b43176227723a4e46b7d95a1bb244db13b08708e63e1669b274
|
4
|
+
data.tar.gz: 87558e6ac3846616a2c8b3d9d489363f5584f0248fc3168228f82980c992a834
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f498c76a3ee4feea47218ae47e2979ec5c67df1d24d5418cfc717d3e0ccdfffab3dfacfd44d4f9c9178aeeb9c9d20a5d6ff97d3b6624c516db8fe1c0507ff64e
|
7
|
+
data.tar.gz: 5148490633c94e498b13835beffd194fc3fab981aafc6546400f0da50272fe8cbf195f1f5d1dc8e28b9f19c656b206ad1c2c1b01818af0c2e4d670f16dc900bd
|
data/.eslintrc.json
CHANGED
@@ -2,8 +2,14 @@
|
|
2
2
|
"extends": "airbnb-base",
|
3
3
|
"rules": {
|
4
4
|
"max-len": ["error", {"code": 200, "ignoreComments": true}],
|
5
|
+
"no-multiple-empty-lines": "off",
|
6
|
+
"import/extensions": "off",
|
7
|
+
"max-classes-per-file": "off",
|
8
|
+
"operator-linebreak": "off",
|
9
|
+
"no-else-return": "off",
|
5
10
|
"no-unused-vars": ["error", { "varsIgnorePattern": "EntitySchema|Identifier|IdentifierSchema|DataElementSchema|ComponentSchema|FacilityLocationSchema|Code|Quantity|Interval|Integer|Array|Float|Time|Number|Date|Mixed|Any" }],
|
6
11
|
"camelcase": "off",
|
12
|
+
"arrow-parens": "off",
|
7
13
|
"comma-dangle": ["error", {
|
8
14
|
"arrays": "always-multiline",
|
9
15
|
"objects": "always-multiline",
|
@@ -0,0 +1,56 @@
|
|
1
|
+
name: Continuous Integration
|
2
|
+
on:
|
3
|
+
pull_request:
|
4
|
+
branches:
|
5
|
+
- master
|
6
|
+
- cqm_models_3_x
|
7
|
+
|
8
|
+
jobs:
|
9
|
+
build:
|
10
|
+
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
|
13
|
+
strategy:
|
14
|
+
matrix:
|
15
|
+
ruby-version: [2.5]
|
16
|
+
mongodb-version: [4.0.18, 4.4]
|
17
|
+
node-version: [12.x, 14.x]
|
18
|
+
|
19
|
+
steps:
|
20
|
+
- uses: actions/checkout@v2
|
21
|
+
- name: Use Ruby ${{ matrix.ruby-version }}
|
22
|
+
uses: ruby/setup-ruby@v1
|
23
|
+
with:
|
24
|
+
ruby-version: ${{ matrix.ruby-version }}
|
25
|
+
bundler: 2.1.4
|
26
|
+
- name: Install dependencies
|
27
|
+
run: bundle install
|
28
|
+
- name: Start MongoDB
|
29
|
+
uses: supercharge/mongodb-github-action@1.3.0
|
30
|
+
with:
|
31
|
+
mongodb-version: ${{ matrix.mongodb-version }}
|
32
|
+
- name: Run audit
|
33
|
+
run: |
|
34
|
+
bundle exec bundle-audit check --update
|
35
|
+
bundle exec bundle-audit check
|
36
|
+
- name: Run rake
|
37
|
+
run: bundle exec rake
|
38
|
+
- name: Run rubocop
|
39
|
+
run: bundle exec rubocop
|
40
|
+
- name: Use Node.js ${{ matrix.node-version }}
|
41
|
+
uses: actions/setup-node@v2
|
42
|
+
with:
|
43
|
+
node-version: ${{ matrix.node-version }}
|
44
|
+
- name: Install Yarn
|
45
|
+
run: npm install -g yarn
|
46
|
+
- name: Run yarn
|
47
|
+
run: |
|
48
|
+
yarn install
|
49
|
+
yarn run lint
|
50
|
+
yarn run test
|
51
|
+
yarn audit
|
52
|
+
- name: Run validation
|
53
|
+
run: |
|
54
|
+
./bin/validate_dist.sh
|
55
|
+
./bin/validate_browser.sh
|
56
|
+
./bin/validate_generator.sh
|
data/README.md
CHANGED
@@ -17,7 +17,7 @@ See the top of the `lib/generate_models.rb` script for RubyGem requirements.
|
|
17
17
|
|
18
18
|
To use, execute the following:
|
19
19
|
```
|
20
|
-
ruby lib/generate_models.rb modelinfo/qdm-modelinfo-5.
|
20
|
+
ruby lib/generate_models.rb modelinfo/qdm-modelinfo-5.6.xml data/oids_qdm_5.6.json
|
21
21
|
```
|
22
22
|
|
23
23
|
The first parameter is the file path to the modelinfo file you wish to generate from. The second parameter is the OID map file. You must include both.
|
@@ -41,7 +41,7 @@ QDM::PatientGeneration.generate_exhaustive_data_element_patients()
|
|
41
41
|
|
42
42
|
To generate a single patient that has every data element from a specific model-info file execute the following:
|
43
43
|
```
|
44
|
-
QDM::PatientGeneration.generate_exhaustive_data_element_patients(false, 'qdm-modelinfo-5.
|
44
|
+
QDM::PatientGeneration.generate_exhaustive_data_element_patients(false, 'qdm-modelinfo-5.6.xml')
|
45
45
|
```
|
46
46
|
|
47
47
|
## Running the tests
|
@@ -69,6 +69,7 @@ Starting with version **2.0.0** released on 6/20/2019, cqm-models versioning has
|
|
69
69
|
| --- | --- |
|
70
70
|
| 2 | 5.4 |
|
71
71
|
| 3 | 5.5 |
|
72
|
+
| 4 | 5.6 |
|
72
73
|
|
73
74
|
* **Y** indicates major changes (incompatible API changes)
|
74
75
|
|
@@ -25,11 +25,11 @@ const AdverseEventSchema = DataElementSchema({
|
|
25
25
|
severity: Code,
|
26
26
|
facilityLocation: FacilityLocationSchema,
|
27
27
|
type: Code,
|
28
|
-
recorder: AnyEntity,
|
28
|
+
recorder: [AnyEntity],
|
29
29
|
qdmTitle: { type: String, default: 'Adverse Event' },
|
30
30
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.120' },
|
31
31
|
qdmCategory: { type: String, default: 'adverse_event' },
|
32
|
-
qdmVersion: { type: String, default: '5.
|
32
|
+
qdmVersion: { type: String, default: '5.6' },
|
33
33
|
_type: { type: String, default: 'QDM::AdverseEvent' },
|
34
34
|
|
35
35
|
});
|
@@ -12,6 +12,8 @@ module.exports.Practitioner = require('./attributes/Practitioner.js').Practition
|
|
12
12
|
module.exports.PractitionerSchema = require('./attributes/Practitioner.js').PractitionerSchema;
|
13
13
|
module.exports.Organization = require('./attributes/Organization.js').Organization;
|
14
14
|
module.exports.OrganizationSchema = require('./attributes/Organization.js').OrganizationSchema;
|
15
|
+
module.exports.Location = require('./attributes/Location.js').Location;
|
16
|
+
module.exports.LocationSchema = require('./attributes/Location.js').LocationSchema;
|
15
17
|
module.exports.PhysicalExamOrder = require('./PhysicalExamOrder.js').PhysicalExamOrder;
|
16
18
|
module.exports.PhysicalExamOrderSchema = require('./PhysicalExamOrder.js').PhysicalExamOrderSchema;
|
17
19
|
module.exports.Participation = require('./Participation.js').Participation;
|
@@ -96,8 +98,6 @@ module.exports.AdverseEvent = require('./AdverseEvent.js').AdverseEvent;
|
|
96
98
|
module.exports.AdverseEventSchema = require('./AdverseEvent.js').AdverseEventSchema;
|
97
99
|
module.exports.DeviceRecommended = require('./DeviceRecommended.js').DeviceRecommended;
|
98
100
|
module.exports.DeviceRecommendedSchema = require('./DeviceRecommended.js').DeviceRecommendedSchema;
|
99
|
-
module.exports.DeviceApplied = require('./DeviceApplied.js').DeviceApplied;
|
100
|
-
module.exports.DeviceAppliedSchema = require('./DeviceApplied.js').DeviceAppliedSchema;
|
101
101
|
module.exports.MedicationDischarge = require('./MedicationDischarge.js').MedicationDischarge;
|
102
102
|
module.exports.MedicationDischargeSchema = require('./MedicationDischarge.js').MedicationDischargeSchema;
|
103
103
|
module.exports.InterventionPerformed = require('./InterventionPerformed.js').InterventionPerformed;
|
@@ -24,12 +24,12 @@ const AllergyIntoleranceSchema = DataElementSchema({
|
|
24
24
|
prevalencePeriod: Interval,
|
25
25
|
type: Code,
|
26
26
|
severity: Code,
|
27
|
-
recorder: AnyEntity,
|
27
|
+
recorder: [AnyEntity],
|
28
28
|
qdmTitle: { type: String, default: 'Allergy/Intolerance' },
|
29
29
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.119' },
|
30
30
|
qdmCategory: { type: String, default: 'allergy' },
|
31
31
|
qdmStatus: { type: String, default: 'intolerance' },
|
32
|
-
qdmVersion: { type: String, default: '5.
|
32
|
+
qdmVersion: { type: String, default: '5.6' },
|
33
33
|
_type: { type: String, default: 'QDM::AllergyIntolerance' },
|
34
34
|
|
35
35
|
});
|
@@ -23,12 +23,12 @@ const AssessmentOrderSchema = DataElementSchema({
|
|
23
23
|
authorDatetime: DateTime,
|
24
24
|
negationRationale: Code,
|
25
25
|
reason: Code,
|
26
|
-
requester: AnyEntity,
|
26
|
+
requester: [AnyEntity],
|
27
27
|
qdmTitle: { type: String, default: 'Assessment, Order' },
|
28
28
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.131' },
|
29
29
|
qdmCategory: { type: String, default: 'assessment' },
|
30
30
|
qdmStatus: { type: String, default: 'order' },
|
31
|
-
qdmVersion: { type: String, default: '5.
|
31
|
+
qdmVersion: { type: String, default: '5.6' },
|
32
32
|
_type: { type: String, default: 'QDM::AssessmentOrder' },
|
33
33
|
|
34
34
|
});
|
@@ -27,14 +27,15 @@ const AssessmentPerformedSchema = DataElementSchema({
|
|
27
27
|
reason: Code,
|
28
28
|
method: Code,
|
29
29
|
result: Any,
|
30
|
+
interpretation: Code,
|
30
31
|
components: [ComponentSchema],
|
31
32
|
relatedTo: [String],
|
32
|
-
performer: AnyEntity,
|
33
|
+
performer: [AnyEntity],
|
33
34
|
qdmTitle: { type: String, default: 'Assessment, Performed' },
|
34
35
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.117' },
|
35
36
|
qdmCategory: { type: String, default: 'assessment' },
|
36
37
|
qdmStatus: { type: String, default: 'performed' },
|
37
|
-
qdmVersion: { type: String, default: '5.
|
38
|
+
qdmVersion: { type: String, default: '5.6' },
|
38
39
|
_type: { type: String, default: 'QDM::AssessmentPerformed' },
|
39
40
|
|
40
41
|
});
|
@@ -23,12 +23,12 @@ const AssessmentRecommendedSchema = DataElementSchema({
|
|
23
23
|
authorDatetime: DateTime,
|
24
24
|
negationRationale: Code,
|
25
25
|
reason: Code,
|
26
|
-
requester: AnyEntity,
|
26
|
+
requester: [AnyEntity],
|
27
27
|
qdmTitle: { type: String, default: 'Assessment, Recommended' },
|
28
28
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.118' },
|
29
29
|
qdmCategory: { type: String, default: 'assessment' },
|
30
30
|
qdmStatus: { type: String, default: 'recommended' },
|
31
|
-
qdmVersion: { type: String, default: '5.
|
31
|
+
qdmVersion: { type: String, default: '5.6' },
|
32
32
|
_type: { type: String, default: 'QDM::AssessmentRecommended' },
|
33
33
|
|
34
34
|
});
|
@@ -24,11 +24,11 @@ const CareGoalSchema = DataElementSchema({
|
|
24
24
|
relevantPeriod: Interval,
|
25
25
|
relatedTo: [String],
|
26
26
|
targetOutcome: Any,
|
27
|
-
performer: AnyEntity,
|
27
|
+
performer: [AnyEntity],
|
28
28
|
qdmTitle: { type: String, default: 'Care Goal' },
|
29
29
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.7' },
|
30
30
|
qdmCategory: { type: String, default: 'care_goal' },
|
31
|
-
qdmVersion: { type: String, default: '5.
|
31
|
+
qdmVersion: { type: String, default: '5.6' },
|
32
32
|
_type: { type: String, default: 'QDM::CareGoal' },
|
33
33
|
|
34
34
|
});
|
@@ -23,8 +23,8 @@ const CommunicationPerformedSchema = DataElementSchema({
|
|
23
23
|
authorDatetime: DateTime,
|
24
24
|
category: Code,
|
25
25
|
medium: Code,
|
26
|
-
sender: AnyEntity,
|
27
|
-
recipient: AnyEntity,
|
26
|
+
sender: [AnyEntity],
|
27
|
+
recipient: [AnyEntity],
|
28
28
|
relatedTo: [String],
|
29
29
|
sentDatetime: DateTime,
|
30
30
|
receivedDatetime: DateTime,
|
@@ -33,7 +33,7 @@ const CommunicationPerformedSchema = DataElementSchema({
|
|
33
33
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.132' },
|
34
34
|
qdmCategory: { type: String, default: 'communication' },
|
35
35
|
qdmStatus: { type: String, default: 'performed' },
|
36
|
-
qdmVersion: { type: String, default: '5.
|
36
|
+
qdmVersion: { type: String, default: '5.6' },
|
37
37
|
_type: { type: String, default: 'QDM::CommunicationPerformed' },
|
38
38
|
|
39
39
|
});
|
@@ -23,12 +23,12 @@ const DeviceOrderSchema = DataElementSchema({
|
|
23
23
|
authorDatetime: DateTime,
|
24
24
|
negationRationale: Code,
|
25
25
|
reason: Code,
|
26
|
-
requester: AnyEntity,
|
26
|
+
requester: [AnyEntity],
|
27
27
|
qdmTitle: { type: String, default: 'Device, Order' },
|
28
28
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.15' },
|
29
29
|
qdmCategory: { type: String, default: 'device' },
|
30
30
|
qdmStatus: { type: String, default: 'order' },
|
31
|
-
qdmVersion: { type: String, default: '5.
|
31
|
+
qdmVersion: { type: String, default: '5.6' },
|
32
32
|
_type: { type: String, default: 'QDM::DeviceOrder' },
|
33
33
|
|
34
34
|
});
|
@@ -23,12 +23,12 @@ const DeviceRecommendedSchema = DataElementSchema({
|
|
23
23
|
authorDatetime: DateTime,
|
24
24
|
negationRationale: Code,
|
25
25
|
reason: Code,
|
26
|
-
requester: AnyEntity,
|
26
|
+
requester: [AnyEntity],
|
27
27
|
qdmTitle: { type: String, default: 'Device, Recommended' },
|
28
28
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.16' },
|
29
29
|
qdmCategory: { type: String, default: 'device' },
|
30
30
|
qdmStatus: { type: String, default: 'recommended' },
|
31
|
-
qdmVersion: { type: String, default: '5.
|
31
|
+
qdmVersion: { type: String, default: '5.6' },
|
32
32
|
_type: { type: String, default: 'QDM::DeviceRecommended' },
|
33
33
|
|
34
34
|
});
|
@@ -24,12 +24,12 @@ const DiagnosisSchema = DataElementSchema({
|
|
24
24
|
prevalencePeriod: Interval,
|
25
25
|
anatomicalLocationSite: Code,
|
26
26
|
severity: Code,
|
27
|
-
recorder: AnyEntity,
|
27
|
+
recorder: [AnyEntity],
|
28
28
|
qdmTitle: { type: String, default: 'Diagnosis' },
|
29
29
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.110' },
|
30
30
|
qrdaOid: { type: String, default: '2.16.840.1.113883.10.20.24.3.135' },
|
31
31
|
qdmCategory: { type: String, default: 'condition' },
|
32
|
-
qdmVersion: { type: String, default: '5.
|
32
|
+
qdmVersion: { type: String, default: '5.6' },
|
33
33
|
_type: { type: String, default: 'QDM::Diagnosis' },
|
34
34
|
|
35
35
|
});
|
@@ -23,12 +23,12 @@ const DiagnosticStudyOrderSchema = DataElementSchema({
|
|
23
23
|
authorDatetime: DateTime,
|
24
24
|
reason: Code,
|
25
25
|
negationRationale: Code,
|
26
|
-
requester: AnyEntity,
|
26
|
+
requester: [AnyEntity],
|
27
27
|
qdmTitle: { type: String, default: 'Diagnostic Study, Order' },
|
28
28
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.22' },
|
29
29
|
qdmCategory: { type: String, default: 'diagnostic_study' },
|
30
30
|
qdmStatus: { type: String, default: 'order' },
|
31
|
-
qdmVersion: { type: String, default: '5.
|
31
|
+
qdmVersion: { type: String, default: '5.6' },
|
32
32
|
_type: { type: String, default: 'QDM::DiagnosticStudyOrder' },
|
33
33
|
|
34
34
|
});
|
@@ -26,17 +26,19 @@ const DiagnosticStudyPerformedSchema = DataElementSchema({
|
|
26
26
|
reason: Code,
|
27
27
|
result: Any,
|
28
28
|
resultDatetime: DateTime,
|
29
|
+
interpretation: Code,
|
29
30
|
status: Code,
|
30
31
|
method: Code,
|
31
32
|
facilityLocation: FacilityLocationSchema,
|
32
33
|
negationRationale: Code,
|
33
34
|
components: [ComponentSchema],
|
34
|
-
performer: AnyEntity,
|
35
|
+
performer: [AnyEntity],
|
36
|
+
relatedTo: [String],
|
35
37
|
qdmTitle: { type: String, default: 'Diagnostic Study, Performed' },
|
36
38
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.23' },
|
37
39
|
qdmCategory: { type: String, default: 'diagnostic_study' },
|
38
40
|
qdmStatus: { type: String, default: 'performed' },
|
39
|
-
qdmVersion: { type: String, default: '5.
|
41
|
+
qdmVersion: { type: String, default: '5.6' },
|
40
42
|
_type: { type: String, default: 'QDM::DiagnosticStudyPerformed' },
|
41
43
|
|
42
44
|
});
|
@@ -22,13 +22,13 @@ const [Number, String] = [
|
|
22
22
|
const DiagnosticStudyRecommendedSchema = DataElementSchema({
|
23
23
|
authorDatetime: DateTime,
|
24
24
|
negationRationale: Code,
|
25
|
-
requester: AnyEntity,
|
25
|
+
requester: [AnyEntity],
|
26
26
|
qdmTitle: { type: String, default: 'Diagnostic Study, Recommended' },
|
27
27
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.24' },
|
28
28
|
qrdaOid: { type: String, default: '2.16.840.1.113883.10.20.24.3.19' },
|
29
29
|
qdmCategory: { type: String, default: 'diagnostic_study' },
|
30
30
|
qdmStatus: { type: String, default: 'recommended' },
|
31
|
-
qdmVersion: { type: String, default: '5.
|
31
|
+
qdmVersion: { type: String, default: '5.6' },
|
32
32
|
_type: { type: String, default: 'QDM::DiagnosticStudyRecommended' },
|
33
33
|
|
34
34
|
});
|
@@ -24,13 +24,13 @@ const EncounterOrderSchema = DataElementSchema({
|
|
24
24
|
reason: Code,
|
25
25
|
facilityLocation: FacilityLocationSchema,
|
26
26
|
negationRationale: Code,
|
27
|
-
requester: AnyEntity,
|
27
|
+
requester: [AnyEntity],
|
28
28
|
priority: Code,
|
29
29
|
qdmTitle: { type: String, default: 'Encounter, Order' },
|
30
30
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.27' },
|
31
31
|
qdmCategory: { type: String, default: 'encounter' },
|
32
32
|
qdmStatus: { type: String, default: 'order' },
|
33
|
-
qdmVersion: { type: String, default: '5.
|
33
|
+
qdmVersion: { type: String, default: '5.6' },
|
34
34
|
_type: { type: String, default: 'QDM::EncounterOrder' },
|
35
35
|
|
36
36
|
});
|
@@ -22,19 +22,20 @@ const [Number, String] = [
|
|
22
22
|
const EncounterPerformedSchema = DataElementSchema({
|
23
23
|
authorDatetime: DateTime,
|
24
24
|
admissionSource: Code,
|
25
|
+
class: Code,
|
25
26
|
relevantPeriod: Interval,
|
26
27
|
dischargeDisposition: Code,
|
27
28
|
facilityLocations: [FacilityLocationSchema],
|
28
29
|
diagnoses: [DiagnosisComponentSchema],
|
29
|
-
negationRationale: Code,
|
30
30
|
lengthOfStay: Quantity,
|
31
31
|
priority: Code,
|
32
|
-
participant: AnyEntity,
|
32
|
+
participant: [AnyEntity],
|
33
|
+
relatedTo: [String],
|
33
34
|
qdmTitle: { type: String, default: 'Encounter, Performed' },
|
34
35
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.5' },
|
35
36
|
qdmCategory: { type: String, default: 'encounter' },
|
36
37
|
qdmStatus: { type: String, default: 'performed' },
|
37
|
-
qdmVersion: { type: String, default: '5.
|
38
|
+
qdmVersion: { type: String, default: '5.6' },
|
38
39
|
_type: { type: String, default: 'QDM::EncounterPerformed' },
|
39
40
|
|
40
41
|
});
|
@@ -44,6 +45,9 @@ class EncounterPerformed extends mongoose.Document {
|
|
44
45
|
constructor(object) {
|
45
46
|
super(object, EncounterPerformedSchema);
|
46
47
|
this._type = 'QDM::EncounterPerformed';
|
48
|
+
if (object && object.clazz) {
|
49
|
+
this.class = object.clazz;
|
50
|
+
}
|
47
51
|
}
|
48
52
|
}
|
49
53
|
|
@@ -24,12 +24,12 @@ const EncounterRecommendedSchema = DataElementSchema({
|
|
24
24
|
reason: Code,
|
25
25
|
facilityLocation: FacilityLocationSchema,
|
26
26
|
negationRationale: Code,
|
27
|
-
requester: AnyEntity,
|
27
|
+
requester: [AnyEntity],
|
28
28
|
qdmTitle: { type: String, default: 'Encounter, Recommended' },
|
29
29
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.28' },
|
30
30
|
qdmCategory: { type: String, default: 'encounter' },
|
31
31
|
qdmStatus: { type: String, default: 'recommended' },
|
32
|
-
qdmVersion: { type: String, default: '5.
|
32
|
+
qdmVersion: { type: String, default: '5.6' },
|
33
33
|
_type: { type: String, default: 'QDM::EncounterRecommended' },
|
34
34
|
|
35
35
|
});
|
@@ -22,12 +22,12 @@ const [Number, String] = [
|
|
22
22
|
const FamilyHistorySchema = DataElementSchema({
|
23
23
|
authorDatetime: DateTime,
|
24
24
|
relationship: Code,
|
25
|
-
recorder: AnyEntity,
|
25
|
+
recorder: [AnyEntity],
|
26
26
|
qdmTitle: { type: String, default: 'Family History' },
|
27
27
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.111' },
|
28
28
|
qrdaOid: { type: String, default: '2.16.840.1.113883.10.20.24.3.12' },
|
29
29
|
qdmCategory: { type: String, default: 'family_history' },
|
30
|
-
qdmVersion: { type: String, default: '5.
|
30
|
+
qdmVersion: { type: String, default: '5.6' },
|
31
31
|
_type: { type: String, default: 'QDM::FamilyHistory' },
|
32
32
|
|
33
33
|
});
|
@@ -26,13 +26,13 @@ const ImmunizationAdministeredSchema = DataElementSchema({
|
|
26
26
|
dosage: Quantity,
|
27
27
|
route: Code,
|
28
28
|
negationRationale: Code,
|
29
|
-
performer: AnyEntity,
|
29
|
+
performer: [AnyEntity],
|
30
30
|
qdmTitle: { type: String, default: 'Immunization, Administered' },
|
31
31
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.112' },
|
32
32
|
qrdaOid: { type: String, default: '2.16.840.1.113883.10.20.24.3.140' },
|
33
33
|
qdmCategory: { type: String, default: 'immunization' },
|
34
34
|
qdmStatus: { type: String, default: 'administered' },
|
35
|
-
qdmVersion: { type: String, default: '5.
|
35
|
+
qdmVersion: { type: String, default: '5.6' },
|
36
36
|
_type: { type: String, default: 'QDM::ImmunizationAdministered' },
|
37
37
|
|
38
38
|
});
|
@@ -27,12 +27,12 @@ const ImmunizationOrderSchema = DataElementSchema({
|
|
27
27
|
reason: Code,
|
28
28
|
route: Code,
|
29
29
|
negationRationale: Code,
|
30
|
-
requester: AnyEntity,
|
30
|
+
requester: [AnyEntity],
|
31
31
|
qdmTitle: { type: String, default: 'Immunization, Order' },
|
32
32
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.113' },
|
33
33
|
qdmCategory: { type: String, default: 'immunization' },
|
34
34
|
qdmStatus: { type: String, default: 'order' },
|
35
|
-
qdmVersion: { type: String, default: '5.
|
35
|
+
qdmVersion: { type: String, default: '5.6' },
|
36
36
|
_type: { type: String, default: 'QDM::ImmunizationOrder' },
|
37
37
|
|
38
38
|
});
|
@@ -23,12 +23,12 @@ const InterventionOrderSchema = DataElementSchema({
|
|
23
23
|
authorDatetime: DateTime,
|
24
24
|
reason: Code,
|
25
25
|
negationRationale: Code,
|
26
|
-
requester: AnyEntity,
|
26
|
+
requester: [AnyEntity],
|
27
27
|
qdmTitle: { type: String, default: 'Intervention, Order' },
|
28
28
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.35' },
|
29
29
|
qdmCategory: { type: String, default: 'intervention' },
|
30
30
|
qdmStatus: { type: String, default: 'order' },
|
31
|
-
qdmVersion: { type: String, default: '5.
|
31
|
+
qdmVersion: { type: String, default: '5.6' },
|
32
32
|
_type: { type: String, default: 'QDM::InterventionOrder' },
|
33
33
|
|
34
34
|
});
|
@@ -27,12 +27,13 @@ const InterventionPerformedSchema = DataElementSchema({
|
|
27
27
|
result: Any,
|
28
28
|
status: Code,
|
29
29
|
negationRationale: Code,
|
30
|
-
performer: AnyEntity,
|
30
|
+
performer: [AnyEntity],
|
31
|
+
relatedTo: [String],
|
31
32
|
qdmTitle: { type: String, default: 'Intervention, Performed' },
|
32
33
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.36' },
|
33
34
|
qdmCategory: { type: String, default: 'intervention' },
|
34
35
|
qdmStatus: { type: String, default: 'performed' },
|
35
|
-
qdmVersion: { type: String, default: '5.
|
36
|
+
qdmVersion: { type: String, default: '5.6' },
|
36
37
|
_type: { type: String, default: 'QDM::InterventionPerformed' },
|
37
38
|
|
38
39
|
});
|
@@ -23,12 +23,12 @@ const InterventionRecommendedSchema = DataElementSchema({
|
|
23
23
|
authorDatetime: DateTime,
|
24
24
|
reason: Code,
|
25
25
|
negationRationale: Code,
|
26
|
-
requester: AnyEntity,
|
26
|
+
requester: [AnyEntity],
|
27
27
|
qdmTitle: { type: String, default: 'Intervention, Recommended' },
|
28
28
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.37' },
|
29
29
|
qdmCategory: { type: String, default: 'intervention' },
|
30
30
|
qdmStatus: { type: String, default: 'recommended' },
|
31
|
-
qdmVersion: { type: String, default: '5.
|
31
|
+
qdmVersion: { type: String, default: '5.6' },
|
32
32
|
_type: { type: String, default: 'QDM::InterventionRecommended' },
|
33
33
|
|
34
34
|
});
|
@@ -23,12 +23,12 @@ const LaboratoryTestOrderSchema = DataElementSchema({
|
|
23
23
|
authorDatetime: DateTime,
|
24
24
|
reason: Code,
|
25
25
|
negationRationale: Code,
|
26
|
-
requester: AnyEntity,
|
26
|
+
requester: [AnyEntity],
|
27
27
|
qdmTitle: { type: String, default: 'Laboratory Test, Order' },
|
28
28
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.41' },
|
29
29
|
qdmCategory: { type: String, default: 'laboratory_test' },
|
30
30
|
qdmStatus: { type: String, default: 'order' },
|
31
|
-
qdmVersion: { type: String, default: '5.
|
31
|
+
qdmVersion: { type: String, default: '5.6' },
|
32
32
|
_type: { type: String, default: 'QDM::LaboratoryTestOrder' },
|
33
33
|
|
34
34
|
});
|
@@ -29,14 +29,16 @@ const LaboratoryTestPerformedSchema = DataElementSchema({
|
|
29
29
|
resultDatetime: DateTime,
|
30
30
|
reason: Code,
|
31
31
|
referenceRange: Interval,
|
32
|
+
interpretation: Code,
|
32
33
|
negationRationale: Code,
|
33
34
|
components: [ComponentSchema],
|
34
|
-
performer: AnyEntity,
|
35
|
+
performer: [AnyEntity],
|
36
|
+
relatedTo: [String],
|
35
37
|
qdmTitle: { type: String, default: 'Laboratory Test, Performed' },
|
36
38
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.42' },
|
37
39
|
qdmCategory: { type: String, default: 'laboratory_test' },
|
38
40
|
qdmStatus: { type: String, default: 'performed' },
|
39
|
-
qdmVersion: { type: String, default: '5.
|
41
|
+
qdmVersion: { type: String, default: '5.6' },
|
40
42
|
_type: { type: String, default: 'QDM::LaboratoryTestPerformed' },
|
41
43
|
|
42
44
|
});
|
@@ -23,12 +23,12 @@ const LaboratoryTestRecommendedSchema = DataElementSchema({
|
|
23
23
|
authorDatetime: DateTime,
|
24
24
|
reason: Code,
|
25
25
|
negationRationale: Code,
|
26
|
-
requester: AnyEntity,
|
26
|
+
requester: [AnyEntity],
|
27
27
|
qdmTitle: { type: String, default: 'Laboratory Test, Recommended' },
|
28
28
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.43' },
|
29
29
|
qdmCategory: { type: String, default: 'laboratory_test' },
|
30
30
|
qdmStatus: { type: String, default: 'recommended' },
|
31
|
-
qdmVersion: { type: String, default: '5.
|
31
|
+
qdmVersion: { type: String, default: '5.6' },
|
32
32
|
_type: { type: String, default: 'QDM::LaboratoryTestRecommended' },
|
33
33
|
|
34
34
|
});
|
@@ -25,12 +25,12 @@ const MedicationActiveSchema = DataElementSchema({
|
|
25
25
|
dosage: Quantity,
|
26
26
|
frequency: Code,
|
27
27
|
route: Code,
|
28
|
-
recorder: AnyEntity,
|
28
|
+
recorder: [AnyEntity],
|
29
29
|
qdmTitle: { type: String, default: 'Medication, Active' },
|
30
30
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.44' },
|
31
31
|
qdmCategory: { type: String, default: 'medication' },
|
32
32
|
qdmStatus: { type: String, default: 'active' },
|
33
|
-
qdmVersion: { type: String, default: '5.
|
33
|
+
qdmVersion: { type: String, default: '5.6' },
|
34
34
|
_type: { type: String, default: 'QDM::MedicationActive' },
|
35
35
|
|
36
36
|
});
|
@@ -28,12 +28,12 @@ const MedicationAdministeredSchema = DataElementSchema({
|
|
28
28
|
route: Code,
|
29
29
|
reason: Code,
|
30
30
|
negationRationale: Code,
|
31
|
-
performer: AnyEntity,
|
31
|
+
performer: [AnyEntity],
|
32
32
|
qdmTitle: { type: String, default: 'Medication, Administered' },
|
33
33
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.45' },
|
34
34
|
qdmCategory: { type: String, default: 'medication' },
|
35
35
|
qdmStatus: { type: String, default: 'administered' },
|
36
|
-
qdmVersion: { type: String, default: '5.
|
36
|
+
qdmVersion: { type: String, default: '5.6' },
|
37
37
|
_type: { type: String, default: 'QDM::MedicationAdministered' },
|
38
38
|
|
39
39
|
});
|
@@ -28,13 +28,13 @@ const MedicationDischargeSchema = DataElementSchema({
|
|
28
28
|
daysSupplied: Number,
|
29
29
|
route: Code,
|
30
30
|
negationRationale: Code,
|
31
|
-
prescriber: AnyEntity,
|
32
|
-
recorder: AnyEntity,
|
31
|
+
prescriber: [AnyEntity],
|
32
|
+
recorder: [AnyEntity],
|
33
33
|
qdmTitle: { type: String, default: 'Medication, Discharge' },
|
34
34
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.48' },
|
35
35
|
qdmCategory: { type: String, default: 'medication' },
|
36
36
|
qdmStatus: { type: String, default: 'discharge' },
|
37
|
-
qdmVersion: { type: String, default: '5.
|
37
|
+
qdmVersion: { type: String, default: '5.6' },
|
38
38
|
_type: { type: String, default: 'QDM::MedicationDischarge' },
|
39
39
|
|
40
40
|
});
|
@@ -29,14 +29,15 @@ const MedicationDispensedSchema = DataElementSchema({
|
|
29
29
|
frequency: Code,
|
30
30
|
daysSupplied: Number,
|
31
31
|
route: Code,
|
32
|
-
prescriber: AnyEntity,
|
33
|
-
dispenser: AnyEntity,
|
32
|
+
prescriber: [AnyEntity],
|
33
|
+
dispenser: [AnyEntity],
|
34
34
|
negationRationale: Code,
|
35
|
+
relatedTo: [String],
|
35
36
|
qdmTitle: { type: String, default: 'Medication, Dispensed' },
|
36
37
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.49' },
|
37
38
|
qdmCategory: { type: String, default: 'medication' },
|
38
39
|
qdmStatus: { type: String, default: 'dispensed' },
|
39
|
-
qdmVersion: { type: String, default: '5.
|
40
|
+
qdmVersion: { type: String, default: '5.6' },
|
40
41
|
_type: { type: String, default: 'QDM::MedicationDispensed' },
|
41
42
|
|
42
43
|
});
|