cqm-models 1.0.3 → 1.1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.eslintrc.json +10 -2
- data/.github/PULL_REQUEST_TEMPLATE.md +0 -4
- data/.rubocop.yml +3 -0
- data/.travis.yml +31 -1
- data/README.md +59 -2
- data/app/assets/javascripts/AdverseEvent.js +16 -7
- data/app/assets/javascripts/AllDataElements.js +6 -6
- data/app/assets/javascripts/AllergyIntolerance.js +16 -7
- data/app/assets/javascripts/AssessmentOrder.js +15 -6
- data/app/assets/javascripts/AssessmentPerformed.js +16 -7
- data/app/assets/javascripts/AssessmentRecommended.js +16 -7
- data/app/assets/javascripts/CareGoal.js +16 -7
- data/app/assets/javascripts/CommunicationPerformed.js +15 -6
- data/app/assets/javascripts/DeviceApplied.js +16 -7
- data/app/assets/javascripts/DeviceOrder.js +16 -7
- data/app/assets/javascripts/DeviceRecommended.js +16 -7
- data/app/assets/javascripts/Diagnosis.js +16 -7
- data/app/assets/javascripts/DiagnosticStudyOrder.js +16 -7
- data/app/assets/javascripts/DiagnosticStudyPerformed.js +16 -7
- data/app/assets/javascripts/DiagnosticStudyRecommended.js +16 -7
- data/app/assets/javascripts/EncounterOrder.js +16 -7
- data/app/assets/javascripts/EncounterPerformed.js +16 -7
- data/app/assets/javascripts/EncounterRecommended.js +16 -7
- data/app/assets/javascripts/FamilyHistory.js +16 -7
- data/app/assets/javascripts/Id.js +7 -3
- data/app/assets/javascripts/ImmunizationAdministered.js +16 -7
- data/app/assets/javascripts/ImmunizationOrder.js +16 -7
- data/app/assets/javascripts/IndividualResult.js +7 -2
- data/app/assets/javascripts/InterventionOrder.js +16 -7
- data/app/assets/javascripts/InterventionPerformed.js +16 -7
- data/app/assets/javascripts/InterventionRecommended.js +16 -7
- data/app/assets/javascripts/LaboratoryTestOrder.js +16 -7
- data/app/assets/javascripts/LaboratoryTestPerformed.js +16 -7
- data/app/assets/javascripts/LaboratoryTestRecommended.js +16 -7
- data/app/assets/javascripts/MedicationActive.js +16 -7
- data/app/assets/javascripts/MedicationAdministered.js +16 -7
- data/app/assets/javascripts/MedicationDischarge.js +16 -7
- data/app/assets/javascripts/MedicationDispensed.js +16 -7
- data/app/assets/javascripts/MedicationOrder.js +16 -7
- data/app/assets/javascripts/Participation.js +15 -6
- data/app/assets/javascripts/PatientCareExperience.js +16 -7
- data/app/assets/javascripts/PatientCharacteristic.js +16 -7
- data/app/assets/javascripts/PatientCharacteristicBirthdate.js +16 -7
- data/app/assets/javascripts/PatientCharacteristicClinicalTrialParticipant.js +16 -7
- data/app/assets/javascripts/PatientCharacteristicEthnicity.js +16 -7
- data/app/assets/javascripts/PatientCharacteristicExpired.js +16 -7
- data/app/assets/javascripts/PatientCharacteristicPayer.js +16 -7
- data/app/assets/javascripts/PatientCharacteristicRace.js +16 -7
- data/app/assets/javascripts/PatientCharacteristicSex.js +16 -7
- data/app/assets/javascripts/PhysicalExamOrder.js +16 -7
- data/app/assets/javascripts/PhysicalExamPerformed.js +16 -7
- data/app/assets/javascripts/PhysicalExamRecommended.js +16 -7
- data/app/assets/javascripts/ProcedureOrder.js +16 -7
- data/app/assets/javascripts/ProcedurePerformed.js +16 -7
- data/app/assets/javascripts/ProcedureRecommended.js +16 -7
- data/app/assets/javascripts/ProviderCareExperience.js +16 -7
- data/app/assets/javascripts/ProviderCharacteristic.js +16 -7
- data/app/assets/javascripts/QDMPatient.js +262 -0
- data/app/assets/javascripts/Result.js +7 -2
- data/app/assets/javascripts/ResultComponent.js +14 -6
- data/app/assets/javascripts/SubstanceAdministered.js +16 -7
- data/app/assets/javascripts/SubstanceOrder.js +16 -7
- data/app/assets/javascripts/SubstanceRecommended.js +16 -7
- data/app/assets/javascripts/Symptom.js +16 -7
- data/app/assets/javascripts/attributes/Component.js +30 -0
- data/app/assets/javascripts/attributes/FacilityLocation.js +30 -0
- data/app/assets/javascripts/basetypes/Any.js +1 -1
- data/app/assets/javascripts/basetypes/Code.js +1 -1
- data/app/assets/javascripts/basetypes/DataElement.js +2 -1
- data/app/assets/javascripts/basetypes/DateTime.js +5 -1
- data/app/assets/javascripts/basetypes/Interval.js +1 -1
- data/app/assets/javascripts/basetypes/Quantity.js +1 -1
- data/app/assets/javascripts/basetypes/Ratio.js +1 -1
- data/app/assets/javascripts/browser.js +3 -0
- data/app/assets/javascripts/cqm/AllCQMModels.js +24 -0
- data/app/assets/javascripts/cqm/CQLLibrary.js +32 -0
- data/app/assets/javascripts/cqm/CQLStatementDependency.js +28 -0
- data/app/assets/javascripts/cqm/Concept.js +17 -0
- data/app/assets/javascripts/cqm/Measure.js +108 -0
- data/app/assets/javascripts/{MeasurePackage.js → cqm/MeasurePackage.js} +9 -3
- data/app/assets/javascripts/cqm/Patient.js +38 -0
- data/app/assets/javascripts/cqm/PopulationSet.js +88 -0
- data/app/assets/javascripts/cqm/Provider.js +44 -0
- data/app/assets/javascripts/cqm/ValueSet.js +26 -0
- data/app/assets/javascripts/index.js +18 -8
- data/app/models/{qdm/tacoma → cqm}/concept.rb +4 -4
- data/app/models/cqm/cql_library.rb +22 -0
- data/app/models/cqm/cql_statement_dependency.rb +24 -0
- data/app/models/cqm/measure.rb +105 -0
- data/app/models/{qdm/tacoma → cqm}/measure_package.rb +2 -2
- data/app/models/cqm/patient.rb +20 -0
- data/app/models/cqm/population_set.rb +86 -0
- data/app/models/cqm/provider.rb +110 -0
- data/app/models/cqm/valueset.rb +15 -0
- data/app/models/hqmfOid_to_datatype_map.json +55 -0
- data/app/models/model_finder.rb +12 -0
- data/app/models/models.rb +18 -6
- data/app/models/qdm/adverse_event.rb +3 -2
- data/app/models/qdm/allergy_intolerance.rb +2 -1
- data/app/models/qdm/assessment_order.rb +1 -0
- data/app/models/qdm/assessment_performed.rb +2 -1
- data/app/models/qdm/assessment_recommended.rb +2 -1
- data/app/models/qdm/attributes/attribute.rb +63 -0
- data/app/models/qdm/{component.rb → attributes/component.rb} +1 -1
- data/app/models/qdm/{facility_location.rb → attributes/facility_location.rb} +1 -1
- data/app/models/qdm/basetypes/data_element.rb +21 -6
- data/app/models/qdm/basetypes/interval.rb +2 -1
- data/app/models/qdm/care_goal.rb +2 -1
- data/app/models/qdm/communication_performed.rb +1 -0
- data/app/models/qdm/device_applied.rb +2 -1
- data/app/models/qdm/device_order.rb +2 -1
- data/app/models/qdm/device_recommended.rb +2 -1
- data/app/models/qdm/diagnosis.rb +2 -1
- data/app/models/qdm/diagnostic_study_order.rb +2 -1
- data/app/models/qdm/diagnostic_study_performed.rb +3 -2
- data/app/models/qdm/diagnostic_study_recommended.rb +2 -1
- data/app/models/qdm/encounter_order.rb +3 -2
- data/app/models/qdm/encounter_performed.rb +2 -1
- data/app/models/qdm/encounter_recommended.rb +3 -2
- data/app/models/qdm/family_history.rb +2 -1
- data/app/models/qdm/immunization_administered.rb +2 -1
- data/app/models/qdm/immunization_order.rb +2 -1
- data/app/models/qdm/intervention_order.rb +2 -1
- data/app/models/qdm/intervention_performed.rb +2 -1
- data/app/models/qdm/intervention_recommended.rb +2 -1
- data/app/models/qdm/laboratory_test_order.rb +2 -1
- data/app/models/qdm/laboratory_test_performed.rb +2 -1
- data/app/models/qdm/laboratory_test_recommended.rb +2 -1
- data/app/models/qdm/medication_active.rb +2 -1
- data/app/models/qdm/medication_administered.rb +2 -1
- data/app/models/qdm/medication_discharge.rb +2 -1
- 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 -0
- data/app/models/qdm/patient.rb +7 -4
- data/app/models/qdm/patient_care_experience.rb +2 -1
- data/app/models/qdm/patient_characteristic.rb +2 -1
- data/app/models/qdm/patient_characteristic_birthdate.rb +2 -1
- data/app/models/qdm/patient_characteristic_clinical_trial_participant.rb +2 -1
- data/app/models/qdm/patient_characteristic_ethnicity.rb +2 -1
- data/app/models/qdm/patient_characteristic_expired.rb +2 -1
- data/app/models/qdm/patient_characteristic_payer.rb +2 -1
- data/app/models/qdm/patient_characteristic_race.rb +2 -1
- data/app/models/qdm/patient_characteristic_sex.rb +2 -1
- data/app/models/qdm/physical_exam_order.rb +2 -1
- data/app/models/qdm/physical_exam_performed.rb +2 -1
- data/app/models/qdm/physical_exam_recommended.rb +2 -1
- data/app/models/qdm/procedure_order.rb +2 -1
- data/app/models/qdm/procedure_performed.rb +2 -1
- data/app/models/qdm/procedure_recommended.rb +2 -1
- data/app/models/qdm/provider_care_experience.rb +2 -1
- data/app/models/qdm/provider_characteristic.rb +2 -1
- data/app/models/qdm/substance_administered.rb +2 -1
- data/app/models/qdm/substance_order.rb +2 -1
- data/app/models/qdm/substance_recommended.rb +2 -1
- data/app/models/qdm/symptom.rb +2 -1
- data/bin/build_cql_execution.sh +8 -0
- data/bin/validate_browser.sh +17 -0
- data/bin/validate_generator.sh +12 -0
- data/cqm-models.gemspec +5 -2
- data/data/oids_qdm_5.4.json +321 -0
- data/data/{oids.json → oids_unversioned.json} +0 -0
- data/dist/browser.js +102937 -0
- data/dist/index.js +36637 -36540
- data/lib/generate_models.rb +89 -93
- data/lib/generate_patients.rb +125 -0
- data/lib/generate_types.rb +64 -0
- data/lib/generators/custom_mongo/model.rb.tt +20 -0
- data/lib/generators/custom_mongo/model_generator.rb +34 -0
- data/notice.md +9 -0
- data/package.json +12 -6
- data/templates/id_template.js.erb +8 -3
- data/templates/index_template.js.erb +18 -8
- data/templates/models_template.rb.erb +20 -4
- data/templates/mongoose_template.js.erb +23 -15
- data/templates/patient_extension.rb.erb +7 -4
- data/templates/patient_template.js.erb +88 -87
- data/yarn.lock +552 -347
- metadata +86 -19
- data/app/assets/javascripts/Component.js +0 -26
- data/app/assets/javascripts/Concept.js +0 -14
- data/app/assets/javascripts/FacilityLocation.js +0 -26
- data/app/assets/javascripts/Measure.js +0 -78
- data/app/assets/javascripts/Patient.js +0 -262
- data/app/assets/javascripts/ValueSet.js +0 -30
- data/app/models/qdm/tacoma/measure.rb +0 -174
- data/app/models/qdm/tacoma/valueset.rb +0 -68
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8466e14ed7d3500909a79c6efba50d1213ae2682defbb4ba43f74748bfe0328a
|
4
|
+
data.tar.gz: 48a6f30ce90a0937fdbe904380596bf33ecda6d404342f24df1f13e1b02a9227
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0f41eb728b0b7134729f1a02ce4687cc297c22f8aede293c2b0cc292af53a11fe73dc4cd56fe9fcbbb1572c92d5e7a39af2f1c369d0aee07b8fa1eac82356aee
|
7
|
+
data.tar.gz: 3fe0418d0f56139048524f27af04e04774af8e13ddae2a2b930d4ff5f80ed018b5deb6c9bf5aea026840ded58f716815895dc707211ecbbdb7b9be3a2fcd2d94
|
data/.eslintrc.json
CHANGED
@@ -7,9 +7,7 @@ Pull requests into cqm-models require the following. Submitter and reviewer shou
|
|
7
7
|
- [ ] Code diff has been done and been reviewed
|
8
8
|
- [ ] Tests are included and test edge cases
|
9
9
|
- [ ] Tests have been run locally and pass
|
10
|
-
- [ ] If there were any JavaScript changes, this PR has updated the `dist` directory using `npm run dist`
|
11
10
|
- [ ] If applicable, the library version number in `package.json` and `cqm-models.gemspec` has been updated
|
12
|
-
- [ ] All changes can be reproduced by running the generator script
|
13
11
|
- [ ] Cqm-execution fixtures have been updated with the update_cqm_execution_fixtures.sh script inside server-scripts using this branch in the cqm-converter
|
14
12
|
|
15
13
|
**Bonnie Reviewer:**
|
@@ -18,7 +16,6 @@ Name:
|
|
18
16
|
- [ ] Code is maintainable and reusable, reuses existing code and infrastructure where appropriate, and accomplishes the task’s purpose
|
19
17
|
- [ ] The tests appropriately test the new code, including edge cases
|
20
18
|
- [ ] You have tried to break the code
|
21
|
-
- [ ] You have executed the generator script, and made sure no changes were made that the generator did not reproduce itself
|
22
19
|
|
23
20
|
**Cypress Reviewer:**
|
24
21
|
|
@@ -26,4 +23,3 @@ Name:
|
|
26
23
|
- [ ] Code is maintainable and reusable, reuses existing code and infrastructure where appropriate, and accomplishes the task’s purpose
|
27
24
|
- [ ] The tests appropriately test the new code, including edge cases
|
28
25
|
- [ ] You have tried to break the code
|
29
|
-
- [ ] You have executed the generator script, and made sure no changes were made that the generator did not reproduce itself
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
@@ -6,10 +6,35 @@ matrix:
|
|
6
6
|
- 2.4.1
|
7
7
|
services:
|
8
8
|
- mongodb
|
9
|
+
before_install:
|
10
|
+
- "find /home/travis/.rvm/rubies -wholename '*default/bundler-*.gemspec' -delete"
|
11
|
+
- rvm @global do gem uninstall bundler -a -x -I || true
|
12
|
+
- gem install bundler -v "< 2.0"
|
9
13
|
script:
|
10
14
|
- bundle exec rake
|
11
15
|
- bundle exec rubocop
|
16
|
+
- bundle exec bundle-audit update && bundle exec bundle-audit check
|
17
|
+
- language: ruby
|
18
|
+
cache: bundler
|
19
|
+
rvm:
|
20
|
+
- 2.3.8
|
21
|
+
services:
|
22
|
+
- mongodb
|
23
|
+
before_install:
|
24
|
+
- "find /home/travis/.rvm/rubies -wholename '*default/bundler-*.gemspec' -delete"
|
25
|
+
- rvm @global do gem uninstall bundler -a -x -I || true
|
26
|
+
- gem install bundler -v "< 2.0"
|
27
|
+
script:
|
28
|
+
- bundle exec rake
|
29
|
+
- bundle exec rubocop
|
30
|
+
- bundle exec bundle-audit update && bundle exec bundle-audit check
|
12
31
|
- language: node_js
|
32
|
+
before_install:
|
33
|
+
- curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.12.3
|
34
|
+
- export PATH=$HOME/.yarn/bin:$PATH
|
35
|
+
install:
|
36
|
+
- npm install -g codecov
|
37
|
+
- npm install -g istanbul
|
13
38
|
node_js:
|
14
39
|
- "node"
|
15
40
|
- "lts/*"
|
@@ -17,6 +42,11 @@ matrix:
|
|
17
42
|
directories:
|
18
43
|
- "node_modules"
|
19
44
|
script:
|
20
|
-
-
|
45
|
+
- yarn install
|
46
|
+
- yarn run lint
|
21
47
|
- yarn run test
|
48
|
+
- yarn audit
|
22
49
|
- ./bin/validate_dist.sh
|
50
|
+
- ./bin/validate_browser.sh
|
51
|
+
- ./bin/validate_generator.sh
|
52
|
+
- codecov
|
data/README.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
[![Build Status](https://travis-ci.
|
1
|
+
[![Build Status](https://travis-ci.com/projecttacoma/cqm-models.svg?branch=master)](https://travis-ci.com/projecttacoma/cqm-models)
|
2
|
+
[![codecov](https://codecov.io/gh/projecttacoma/cqm-models/branch/master/graph/badge.svg)](https://codecov.io/gh/projecttacoma/cqm-models)
|
2
3
|
[![Gem Version](https://badge.fury.io/rb/cqm-models.svg)](https://badge.fury.io/rb/cqm-models)
|
3
4
|
![NPM](https://img.shields.io/npm/v/cqm-models.svg)
|
4
5
|
|
@@ -16,7 +17,7 @@ See the top of the `lib/generate_models.rb` script for RubyGem requirements.
|
|
16
17
|
|
17
18
|
To use, execute the following:
|
18
19
|
```
|
19
|
-
ruby lib/generate_models.rb modelinfo/qdm-modelinfo-5.4.xml data/
|
20
|
+
ruby lib/generate_models.rb modelinfo/qdm-modelinfo-5.4.xml data/oids_qdm_5.4.json
|
20
21
|
```
|
21
22
|
|
22
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.
|
@@ -28,3 +29,59 @@ Ruby: `app/models/qdm/`
|
|
28
29
|
JavaScript: `app/assets/javascripts/`
|
29
30
|
|
30
31
|
The JavaScript models as-is are intended to be used server side under something like node.js. A browserified version that can be used client side is included as `dist/index.js`.
|
32
|
+
|
33
|
+
## QDM Patient Generator Script (lib/generate_patients.rb)
|
34
|
+
|
35
|
+
The QDM patient generator script can be used to create CQMPatients that have a QDMPatient which contains every data element type specified in the model-info file
|
36
|
+
|
37
|
+
To generate a set of patients using the most recent model-info file, each of which has a single data element in addition to the 5 PatientCharactaristic types execute the following:
|
38
|
+
```
|
39
|
+
QDM::PatientGeneration.generate_exhastive_data_element_patients()
|
40
|
+
```
|
41
|
+
|
42
|
+
To generate a single patient that has every data element from a specific model-info file execute the following:
|
43
|
+
```
|
44
|
+
QDM::PatientGeneration.generate_exhastive_data_element_patients(false, 'qdm-modelinfo-5.3.xml')
|
45
|
+
```
|
46
|
+
|
47
|
+
## Running the tests
|
48
|
+
|
49
|
+
### To run frontend Jasmine tests
|
50
|
+
|
51
|
+
```
|
52
|
+
yarn test
|
53
|
+
```
|
54
|
+
|
55
|
+
### To run backend Ruby tests
|
56
|
+
|
57
|
+
```
|
58
|
+
bundle exec rake
|
59
|
+
```
|
60
|
+
|
61
|
+
|
62
|
+
## Versioning
|
63
|
+
|
64
|
+
Starting with version **1.1.1.0** released on 5/22/2019, cqm-models versioning has the format **W.X.Y.Z**, where:
|
65
|
+
|
66
|
+
* **W** maps to a version of QDM. See the table below to see the existing mapping to QDM versions.
|
67
|
+
|
68
|
+
| W | QDM version |
|
69
|
+
| --- | --- |
|
70
|
+
| 1 | 5.4 |
|
71
|
+
|
72
|
+
* **X.Y.Z** uses [SemVer](http://semver.org/) for versioning. **X.Y.Z** starts at 0.0.0 when **W** is incremented.
|
73
|
+
|
74
|
+
For the versions available, see [tags on this repository](https://github.com/projecttacoma/cqm-models/tags).
|
75
|
+
|
76
|
+
|
77
|
+
## License
|
78
|
+
|
79
|
+
Copyright 2018 The MITRE Corporation
|
80
|
+
|
81
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
|
82
|
+
|
83
|
+
```
|
84
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
85
|
+
```
|
86
|
+
|
87
|
+
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
@@ -1,13 +1,15 @@
|
|
1
|
-
const mongoose = require('mongoose');
|
1
|
+
const mongoose = require('mongoose/browser');
|
2
|
+
|
3
|
+
const { IdSchema } = require('./Id');
|
2
4
|
const { DataElementSchema } = require('./basetypes/DataElement');
|
3
5
|
const Code = require('./basetypes/Code');
|
4
6
|
const Interval = require('./basetypes/Interval');
|
5
7
|
const Quantity = require('./basetypes/Quantity');
|
6
8
|
const DateTime = require('./basetypes/DateTime');
|
7
|
-
const { ComponentSchema } = require('./Component');
|
8
|
-
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
-
const { IdSchema } = require('./Id');
|
10
9
|
const Any = require('./basetypes/Any');
|
10
|
+
const { ComponentSchema } = require('./attributes/Component');
|
11
|
+
const { FacilityLocationSchema } = require('./attributes/FacilityLocation');
|
12
|
+
|
11
13
|
|
12
14
|
const [Number, String] = [
|
13
15
|
mongoose.Schema.Types.Number,
|
@@ -20,12 +22,19 @@ const AdverseEventSchema = DataElementSchema({
|
|
20
22
|
severity: Code,
|
21
23
|
facilityLocation: FacilityLocationSchema,
|
22
24
|
type: Code,
|
23
|
-
|
25
|
+
qdmTitle: { type: String, default: 'Adverse Event' },
|
26
|
+
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.120' },
|
24
27
|
qdmCategory: { type: String, default: 'adverse_event' },
|
25
28
|
qdmVersion: { type: String, default: '5.4' },
|
26
|
-
_type: { type: String, default: 'AdverseEvent' },
|
29
|
+
_type: { type: String, default: 'QDM::AdverseEvent' },
|
27
30
|
|
28
31
|
});
|
29
32
|
|
30
33
|
module.exports.AdverseEventSchema = AdverseEventSchema;
|
31
|
-
|
34
|
+
class AdverseEvent extends mongoose.Document {
|
35
|
+
constructor(object) {
|
36
|
+
super(object, AdverseEventSchema);
|
37
|
+
this._type = 'QDM::AdverseEvent';
|
38
|
+
}
|
39
|
+
}
|
40
|
+
module.exports.AdverseEvent = AdverseEvent;
|
@@ -1,5 +1,3 @@
|
|
1
|
-
module.exports.Patient = require('./Patient.js').Patient;
|
2
|
-
module.exports.PatientSchema = require('./Patient.js').PatientSchema;
|
3
1
|
module.exports.Id = require('./Id.js').Id;
|
4
2
|
module.exports.IdSchema = require('./Id.js').IdSchema;
|
5
3
|
module.exports.PhysicalExamOrder = require('./PhysicalExamOrder.js').PhysicalExamOrder;
|
@@ -42,12 +40,12 @@ module.exports.InterventionOrder = require('./InterventionOrder.js').Interventio
|
|
42
40
|
module.exports.InterventionOrderSchema = require('./InterventionOrder.js').InterventionOrderSchema;
|
43
41
|
module.exports.FamilyHistory = require('./FamilyHistory.js').FamilyHistory;
|
44
42
|
module.exports.FamilyHistorySchema = require('./FamilyHistory.js').FamilyHistorySchema;
|
45
|
-
module.exports.Component = require('./Component.js').Component;
|
46
|
-
module.exports.ComponentSchema = require('./Component.js').ComponentSchema;
|
43
|
+
module.exports.Component = require('./attributes/Component.js').Component;
|
44
|
+
module.exports.ComponentSchema = require('./attributes/Component.js').ComponentSchema;
|
47
45
|
module.exports.ResultComponent = require('./ResultComponent.js').ResultComponent;
|
48
46
|
module.exports.ResultComponentSchema = require('./ResultComponent.js').ResultComponentSchema;
|
49
|
-
module.exports.FacilityLocation = require('./FacilityLocation.js').FacilityLocation;
|
50
|
-
module.exports.FacilityLocationSchema = require('./FacilityLocation.js').FacilityLocationSchema;
|
47
|
+
module.exports.FacilityLocation = require('./attributes/FacilityLocation.js').FacilityLocation;
|
48
|
+
module.exports.FacilityLocationSchema = require('./attributes/FacilityLocation.js').FacilityLocationSchema;
|
51
49
|
module.exports.MedicationActive = require('./MedicationActive.js').MedicationActive;
|
52
50
|
module.exports.MedicationActiveSchema = require('./MedicationActive.js').MedicationActiveSchema;
|
53
51
|
module.exports.LaboratoryTestOrder = require('./LaboratoryTestOrder.js').LaboratoryTestOrder;
|
@@ -114,3 +112,5 @@ module.exports.InterventionRecommended = require('./InterventionRecommended.js')
|
|
114
112
|
module.exports.InterventionRecommendedSchema = require('./InterventionRecommended.js').InterventionRecommendedSchema;
|
115
113
|
module.exports.PhysicalExamPerformed = require('./PhysicalExamPerformed.js').PhysicalExamPerformed;
|
116
114
|
module.exports.PhysicalExamPerformedSchema = require('./PhysicalExamPerformed.js').PhysicalExamPerformedSchema;
|
115
|
+
module.exports.QDMPatient = require('./QDMPatient.js').QDMPatient;
|
116
|
+
module.exports.QDMPatientSchema = require('./QDMPatient.js').QDMPatientSchema;
|
@@ -1,13 +1,15 @@
|
|
1
|
-
const mongoose = require('mongoose');
|
1
|
+
const mongoose = require('mongoose/browser');
|
2
|
+
|
3
|
+
const { IdSchema } = require('./Id');
|
2
4
|
const { DataElementSchema } = require('./basetypes/DataElement');
|
3
5
|
const Code = require('./basetypes/Code');
|
4
6
|
const Interval = require('./basetypes/Interval');
|
5
7
|
const Quantity = require('./basetypes/Quantity');
|
6
8
|
const DateTime = require('./basetypes/DateTime');
|
7
|
-
const { ComponentSchema } = require('./Component');
|
8
|
-
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
-
const { IdSchema } = require('./Id');
|
10
9
|
const Any = require('./basetypes/Any');
|
10
|
+
const { ComponentSchema } = require('./attributes/Component');
|
11
|
+
const { FacilityLocationSchema } = require('./attributes/FacilityLocation');
|
12
|
+
|
11
13
|
|
12
14
|
const [Number, String] = [
|
13
15
|
mongoose.Schema.Types.Number,
|
@@ -19,13 +21,20 @@ const AllergyIntoleranceSchema = DataElementSchema({
|
|
19
21
|
prevalencePeriod: Interval,
|
20
22
|
type: Code,
|
21
23
|
severity: Code,
|
22
|
-
|
24
|
+
qdmTitle: { type: String, default: 'Allergy/Intolerance' },
|
25
|
+
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.119' },
|
23
26
|
qdmCategory: { type: String, default: 'allergy' },
|
24
27
|
qdmStatus: { type: String, default: 'intolerance' },
|
25
28
|
qdmVersion: { type: String, default: '5.4' },
|
26
|
-
_type: { type: String, default: 'AllergyIntolerance' },
|
29
|
+
_type: { type: String, default: 'QDM::AllergyIntolerance' },
|
27
30
|
|
28
31
|
});
|
29
32
|
|
30
33
|
module.exports.AllergyIntoleranceSchema = AllergyIntoleranceSchema;
|
31
|
-
|
34
|
+
class AllergyIntolerance extends mongoose.Document {
|
35
|
+
constructor(object) {
|
36
|
+
super(object, AllergyIntoleranceSchema);
|
37
|
+
this._type = 'QDM::AllergyIntolerance';
|
38
|
+
}
|
39
|
+
}
|
40
|
+
module.exports.AllergyIntolerance = AllergyIntolerance;
|
@@ -1,13 +1,15 @@
|
|
1
|
-
const mongoose = require('mongoose');
|
1
|
+
const mongoose = require('mongoose/browser');
|
2
|
+
|
3
|
+
const { IdSchema } = require('./Id');
|
2
4
|
const { DataElementSchema } = require('./basetypes/DataElement');
|
3
5
|
const Code = require('./basetypes/Code');
|
4
6
|
const Interval = require('./basetypes/Interval');
|
5
7
|
const Quantity = require('./basetypes/Quantity');
|
6
8
|
const DateTime = require('./basetypes/DateTime');
|
7
|
-
const { ComponentSchema } = require('./Component');
|
8
|
-
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
-
const { IdSchema } = require('./Id');
|
10
9
|
const Any = require('./basetypes/Any');
|
10
|
+
const { ComponentSchema } = require('./attributes/Component');
|
11
|
+
const { FacilityLocationSchema } = require('./attributes/FacilityLocation');
|
12
|
+
|
11
13
|
|
12
14
|
const [Number, String] = [
|
13
15
|
mongoose.Schema.Types.Number,
|
@@ -18,13 +20,20 @@ const AssessmentOrderSchema = DataElementSchema({
|
|
18
20
|
authorDatetime: DateTime,
|
19
21
|
negationRationale: Code,
|
20
22
|
reason: Code,
|
23
|
+
qdmTitle: { type: String, default: 'Assessment, Order' },
|
21
24
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.131' },
|
22
25
|
qdmCategory: { type: String, default: 'assessment' },
|
23
26
|
qdmStatus: { type: String, default: 'order' },
|
24
27
|
qdmVersion: { type: String, default: '5.4' },
|
25
|
-
_type: { type: String, default: 'AssessmentOrder' },
|
28
|
+
_type: { type: String, default: 'QDM::AssessmentOrder' },
|
26
29
|
|
27
30
|
});
|
28
31
|
|
29
32
|
module.exports.AssessmentOrderSchema = AssessmentOrderSchema;
|
30
|
-
|
33
|
+
class AssessmentOrder extends mongoose.Document {
|
34
|
+
constructor(object) {
|
35
|
+
super(object, AssessmentOrderSchema);
|
36
|
+
this._type = 'QDM::AssessmentOrder';
|
37
|
+
}
|
38
|
+
}
|
39
|
+
module.exports.AssessmentOrder = AssessmentOrder;
|
@@ -1,13 +1,15 @@
|
|
1
|
-
const mongoose = require('mongoose');
|
1
|
+
const mongoose = require('mongoose/browser');
|
2
|
+
|
3
|
+
const { IdSchema } = require('./Id');
|
2
4
|
const { DataElementSchema } = require('./basetypes/DataElement');
|
3
5
|
const Code = require('./basetypes/Code');
|
4
6
|
const Interval = require('./basetypes/Interval');
|
5
7
|
const Quantity = require('./basetypes/Quantity');
|
6
8
|
const DateTime = require('./basetypes/DateTime');
|
7
|
-
const { ComponentSchema } = require('./Component');
|
8
|
-
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
-
const { IdSchema } = require('./Id');
|
10
9
|
const Any = require('./basetypes/Any');
|
10
|
+
const { ComponentSchema } = require('./attributes/Component');
|
11
|
+
const { FacilityLocationSchema } = require('./attributes/FacilityLocation');
|
12
|
+
|
11
13
|
|
12
14
|
const [Number, String] = [
|
13
15
|
mongoose.Schema.Types.Number,
|
@@ -22,13 +24,20 @@ const AssessmentPerformedSchema = DataElementSchema({
|
|
22
24
|
result: Any,
|
23
25
|
components: [ComponentSchema],
|
24
26
|
relatedTo: [IdSchema],
|
25
|
-
|
27
|
+
qdmTitle: { type: String, default: 'Assessment, Performed' },
|
28
|
+
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.117' },
|
26
29
|
qdmCategory: { type: String, default: 'assessment' },
|
27
30
|
qdmStatus: { type: String, default: 'performed' },
|
28
31
|
qdmVersion: { type: String, default: '5.4' },
|
29
|
-
_type: { type: String, default: 'AssessmentPerformed' },
|
32
|
+
_type: { type: String, default: 'QDM::AssessmentPerformed' },
|
30
33
|
|
31
34
|
});
|
32
35
|
|
33
36
|
module.exports.AssessmentPerformedSchema = AssessmentPerformedSchema;
|
34
|
-
|
37
|
+
class AssessmentPerformed extends mongoose.Document {
|
38
|
+
constructor(object) {
|
39
|
+
super(object, AssessmentPerformedSchema);
|
40
|
+
this._type = 'QDM::AssessmentPerformed';
|
41
|
+
}
|
42
|
+
}
|
43
|
+
module.exports.AssessmentPerformed = AssessmentPerformed;
|
@@ -1,13 +1,15 @@
|
|
1
|
-
const mongoose = require('mongoose');
|
1
|
+
const mongoose = require('mongoose/browser');
|
2
|
+
|
3
|
+
const { IdSchema } = require('./Id');
|
2
4
|
const { DataElementSchema } = require('./basetypes/DataElement');
|
3
5
|
const Code = require('./basetypes/Code');
|
4
6
|
const Interval = require('./basetypes/Interval');
|
5
7
|
const Quantity = require('./basetypes/Quantity');
|
6
8
|
const DateTime = require('./basetypes/DateTime');
|
7
|
-
const { ComponentSchema } = require('./Component');
|
8
|
-
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
-
const { IdSchema } = require('./Id');
|
10
9
|
const Any = require('./basetypes/Any');
|
10
|
+
const { ComponentSchema } = require('./attributes/Component');
|
11
|
+
const { FacilityLocationSchema } = require('./attributes/FacilityLocation');
|
12
|
+
|
11
13
|
|
12
14
|
const [Number, String] = [
|
13
15
|
mongoose.Schema.Types.Number,
|
@@ -18,13 +20,20 @@ const AssessmentRecommendedSchema = DataElementSchema({
|
|
18
20
|
authorDatetime: DateTime,
|
19
21
|
negationRationale: Code,
|
20
22
|
reason: Code,
|
21
|
-
|
23
|
+
qdmTitle: { type: String, default: 'Assessment, Recommended' },
|
24
|
+
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.118' },
|
22
25
|
qdmCategory: { type: String, default: 'assessment' },
|
23
26
|
qdmStatus: { type: String, default: 'recommended' },
|
24
27
|
qdmVersion: { type: String, default: '5.4' },
|
25
|
-
_type: { type: String, default: 'AssessmentRecommended' },
|
28
|
+
_type: { type: String, default: 'QDM::AssessmentRecommended' },
|
26
29
|
|
27
30
|
});
|
28
31
|
|
29
32
|
module.exports.AssessmentRecommendedSchema = AssessmentRecommendedSchema;
|
30
|
-
|
33
|
+
class AssessmentRecommended extends mongoose.Document {
|
34
|
+
constructor(object) {
|
35
|
+
super(object, AssessmentRecommendedSchema);
|
36
|
+
this._type = 'QDM::AssessmentRecommended';
|
37
|
+
}
|
38
|
+
}
|
39
|
+
module.exports.AssessmentRecommended = AssessmentRecommended;
|
@@ -1,13 +1,15 @@
|
|
1
|
-
const mongoose = require('mongoose');
|
1
|
+
const mongoose = require('mongoose/browser');
|
2
|
+
|
3
|
+
const { IdSchema } = require('./Id');
|
2
4
|
const { DataElementSchema } = require('./basetypes/DataElement');
|
3
5
|
const Code = require('./basetypes/Code');
|
4
6
|
const Interval = require('./basetypes/Interval');
|
5
7
|
const Quantity = require('./basetypes/Quantity');
|
6
8
|
const DateTime = require('./basetypes/DateTime');
|
7
|
-
const { ComponentSchema } = require('./Component');
|
8
|
-
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
-
const { IdSchema } = require('./Id');
|
10
9
|
const Any = require('./basetypes/Any');
|
10
|
+
const { ComponentSchema } = require('./attributes/Component');
|
11
|
+
const { FacilityLocationSchema } = require('./attributes/FacilityLocation');
|
12
|
+
|
11
13
|
|
12
14
|
const [Number, String] = [
|
13
15
|
mongoose.Schema.Types.Number,
|
@@ -18,12 +20,19 @@ const CareGoalSchema = DataElementSchema({
|
|
18
20
|
relevantPeriod: Interval,
|
19
21
|
relatedTo: [IdSchema],
|
20
22
|
targetOutcome: Any,
|
21
|
-
|
23
|
+
qdmTitle: { type: String, default: 'Care Goal' },
|
24
|
+
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.4.7' },
|
22
25
|
qdmCategory: { type: String, default: 'care_goal' },
|
23
26
|
qdmVersion: { type: String, default: '5.4' },
|
24
|
-
_type: { type: String, default: 'CareGoal' },
|
27
|
+
_type: { type: String, default: 'QDM::CareGoal' },
|
25
28
|
|
26
29
|
});
|
27
30
|
|
28
31
|
module.exports.CareGoalSchema = CareGoalSchema;
|
29
|
-
|
32
|
+
class CareGoal extends mongoose.Document {
|
33
|
+
constructor(object) {
|
34
|
+
super(object, CareGoalSchema);
|
35
|
+
this._type = 'QDM::CareGoal';
|
36
|
+
}
|
37
|
+
}
|
38
|
+
module.exports.CareGoal = CareGoal;
|