cqm-models 0.8.3 → 0.8.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.eslintrc.json +1 -1
- data/app/assets/javascripts/AdverseEvent.js +1 -0
- data/app/assets/javascripts/AllergyIntolerance.js +1 -0
- data/app/assets/javascripts/AssessmentPerformed.js +2 -1
- data/app/assets/javascripts/AssessmentRecommended.js +1 -0
- data/app/assets/javascripts/CareGoal.js +2 -1
- data/app/assets/javascripts/CommunicationFromPatientToProvider.js +2 -1
- data/app/assets/javascripts/CommunicationFromProviderToPatient.js +2 -1
- data/app/assets/javascripts/CommunicationFromProviderToProvider.js +2 -1
- data/app/assets/javascripts/Component.js +1 -0
- data/app/assets/javascripts/DeviceApplied.js +1 -0
- data/app/assets/javascripts/DeviceOrder.js +1 -0
- data/app/assets/javascripts/DeviceRecommended.js +1 -0
- data/app/assets/javascripts/Diagnosis.js +1 -0
- data/app/assets/javascripts/DiagnosticStudyOrder.js +1 -0
- data/app/assets/javascripts/DiagnosticStudyPerformed.js +1 -0
- data/app/assets/javascripts/DiagnosticStudyRecommended.js +1 -0
- data/app/assets/javascripts/EncounterOrder.js +1 -0
- data/app/assets/javascripts/EncounterPerformed.js +1 -0
- data/app/assets/javascripts/EncounterRecommended.js +1 -0
- data/app/assets/javascripts/FacilityLocation.js +1 -0
- data/app/assets/javascripts/FamilyHistory.js +1 -0
- data/app/assets/javascripts/Id.js +2 -10
- data/app/assets/javascripts/ImmunizationAdministered.js +1 -0
- data/app/assets/javascripts/ImmunizationOrder.js +1 -0
- data/app/assets/javascripts/InterventionOrder.js +1 -0
- data/app/assets/javascripts/InterventionPerformed.js +1 -0
- data/app/assets/javascripts/InterventionRecommended.js +1 -0
- data/app/assets/javascripts/LaboratoryTestOrder.js +1 -0
- data/app/assets/javascripts/LaboratoryTestPerformed.js +1 -0
- data/app/assets/javascripts/LaboratoryTestRecommended.js +1 -0
- data/app/assets/javascripts/MedicationActive.js +1 -0
- data/app/assets/javascripts/MedicationAdministered.js +1 -0
- data/app/assets/javascripts/MedicationDischarge.js +1 -0
- data/app/assets/javascripts/MedicationDispensed.js +1 -0
- data/app/assets/javascripts/MedicationOrder.js +1 -0
- data/app/assets/javascripts/Participation.js +1 -0
- data/app/assets/javascripts/Patient.js +4 -8
- data/app/assets/javascripts/PatientCareExperience.js +1 -0
- data/app/assets/javascripts/PatientCharacteristic.js +1 -0
- data/app/assets/javascripts/PatientCharacteristicBirthdate.js +1 -0
- data/app/assets/javascripts/PatientCharacteristicClinicalTrialParticipant.js +1 -0
- data/app/assets/javascripts/PatientCharacteristicEthnicity.js +1 -0
- data/app/assets/javascripts/PatientCharacteristicExpired.js +1 -0
- data/app/assets/javascripts/PatientCharacteristicPayer.js +1 -0
- data/app/assets/javascripts/PatientCharacteristicRace.js +1 -0
- data/app/assets/javascripts/PatientCharacteristicSex.js +1 -0
- data/app/assets/javascripts/PhysicalExamOrder.js +1 -0
- data/app/assets/javascripts/PhysicalExamPerformed.js +1 -0
- data/app/assets/javascripts/PhysicalExamRecommended.js +1 -0
- data/app/assets/javascripts/ProcedureOrder.js +1 -0
- data/app/assets/javascripts/ProcedurePerformed.js +1 -0
- data/app/assets/javascripts/ProcedureRecommended.js +1 -0
- data/app/assets/javascripts/ProviderCareExperience.js +1 -0
- data/app/assets/javascripts/ProviderCharacteristic.js +1 -0
- data/app/assets/javascripts/Ratio.js +1 -0
- data/app/assets/javascripts/ResultComponent.js +1 -0
- data/app/assets/javascripts/SubstanceAdministered.js +1 -0
- data/app/assets/javascripts/SubstanceOrder.js +1 -0
- data/app/assets/javascripts/SubstanceRecommended.js +1 -0
- data/app/assets/javascripts/Symptom.js +1 -0
- data/app/assets/javascripts/basetypes/Any.js +1 -1
- data/app/assets/javascripts/basetypes/DataElement.js +7 -0
- data/app/models/models.rb +3 -1
- data/app/models/qdm/assessment_performed.rb +1 -1
- data/app/models/qdm/basetypes/data_element.rb +8 -5
- data/app/models/qdm/care_goal.rb +1 -1
- data/app/models/qdm/communication_from_patient_to_provider.rb +1 -1
- data/app/models/qdm/communication_from_provider_to_patient.rb +1 -1
- data/app/models/qdm/communication_from_provider_to_provider.rb +1 -1
- data/app/models/qdm/component.rb +0 -1
- data/app/models/qdm/facility_location.rb +0 -1
- data/app/models/qdm/id.rb +2 -2
- data/cqm-models.gemspec +1 -1
- data/dist/index.js +137 -84
- data/lib/generate_models.rb +27 -19
- data/package.json +1 -1
- data/templates/id_template.js.erb +15 -0
- data/templates/models_template.rb.erb +4 -0
- data/templates/mongoose_template.js.erb +1 -0
- data/templates/patient_template.js.erb +4 -8
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 363b774ed856747c2e2072c19509c6b07cbc9f32
|
4
|
+
data.tar.gz: 6023d0d51527e7d983e654d07be048787b708e74
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e9cfd973933d81ab07bf72a680c81059dbcffa3db16dd42920d94f5886b141404199aebfcc885c9fcaeb9c2cefb0ea2b0c418d288174dc4db1f55db90980fdde
|
7
|
+
data.tar.gz: '08fcc6ffbb2d6c0f3998fb07c3d4238b5c334af360ecbf00acb01f624cfd0648cf522b5831c589ad2292d7d0a9916af33c804c601cdadbe853ba46e61972e85e'
|
data/.eslintrc.json
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
"extends": "airbnb-base",
|
3
3
|
"rules": {
|
4
4
|
"max-len": ["error", {"code": 200, "ignoreComments": true}],
|
5
|
-
"no-unused-vars": ["error", { "varsIgnorePattern": "DataElementSchema|ComponentSchema|FacilityLocationSchema|Code|Quantity|Interval|Integer|Array|Float|Time|Number|Date|Mixed|Any" }],
|
5
|
+
"no-unused-vars": ["error", { "varsIgnorePattern": "IdSchema|DataElementSchema|ComponentSchema|FacilityLocationSchema|Code|Quantity|Interval|Integer|Array|Float|Time|Number|Date|Mixed|Any" }],
|
6
6
|
"camelcase": "off",
|
7
7
|
"comma-dangle": ["error", {
|
8
8
|
"arrays": "always-multiline",
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -20,7 +21,7 @@ const AssessmentPerformedSchema = DataElementSchema({
|
|
20
21
|
method: Code,
|
21
22
|
result: Any,
|
22
23
|
components: [ComponentSchema],
|
23
|
-
relatedTo: [
|
24
|
+
relatedTo: [IdSchema],
|
24
25
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.3.117' },
|
25
26
|
category: { type: String, default: 'assessment' },
|
26
27
|
qdmStatus: { type: String, default: 'performed' },
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -15,7 +16,7 @@ const [Number, String] = [
|
|
15
16
|
|
16
17
|
const CareGoalSchema = DataElementSchema({
|
17
18
|
relevantPeriod: Interval,
|
18
|
-
relatedTo: [
|
19
|
+
relatedTo: [IdSchema],
|
19
20
|
targetOutcome: Any,
|
20
21
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.3.7' },
|
21
22
|
category: { type: String, default: 'care_goal' },
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -15,7 +16,7 @@ const [Number, String] = [
|
|
15
16
|
|
16
17
|
const CommunicationFromPatientToProviderSchema = DataElementSchema({
|
17
18
|
authorDatetime: DateTime,
|
18
|
-
relatedTo: [
|
19
|
+
relatedTo: [IdSchema],
|
19
20
|
negationRationale: Code,
|
20
21
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.3.8' },
|
21
22
|
category: { type: String, default: 'communication' },
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -15,7 +16,7 @@ const [Number, String] = [
|
|
15
16
|
|
16
17
|
const CommunicationFromProviderToPatientSchema = DataElementSchema({
|
17
18
|
authorDatetime: DateTime,
|
18
|
-
relatedTo: [
|
19
|
+
relatedTo: [IdSchema],
|
19
20
|
negationRationale: Code,
|
20
21
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.3.9' },
|
21
22
|
category: { type: String, default: 'communication' },
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -15,7 +16,7 @@ const [Number, String] = [
|
|
15
16
|
|
16
17
|
const CommunicationFromProviderToProviderSchema = DataElementSchema({
|
17
18
|
authorDatetime: DateTime,
|
18
|
-
relatedTo: [
|
19
|
+
relatedTo: [IdSchema],
|
19
20
|
negationRationale: Code,
|
20
21
|
hqmfOid: { type: String, default: '2.16.840.1.113883.10.20.28.3.10' },
|
21
22
|
category: { type: String, default: 'communication' },
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -1,25 +1,17 @@
|
|
1
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
|
-
const { ComponentSchema } = require('./Component');
|
8
|
-
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
-
const Any = require('./basetypes/Any');
|
10
2
|
|
11
3
|
const [Number, String] = [
|
12
4
|
mongoose.Schema.Types.Number,
|
13
5
|
mongoose.Schema.Types.String,
|
14
6
|
];
|
15
7
|
|
16
|
-
const IdSchema =
|
8
|
+
const IdSchema = mongoose.Schema({
|
17
9
|
namingSystem: String,
|
18
10
|
value: String,
|
19
11
|
qdmVersion: { type: String, default: '5.3' },
|
20
12
|
_type: { type: String, default: 'Id' },
|
21
13
|
|
22
|
-
});
|
14
|
+
}, { _id: false, id: false });
|
23
15
|
|
24
16
|
module.exports.IdSchema = IdSchema;
|
25
17
|
module.exports.Id = mongoose.model('Id', IdSchema);
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -90,15 +90,11 @@ PatientSchema.methods.getByProfile = function getByProfile(profile, isNegated =
|
|
90
90
|
// If isNegated == null, return all matching data elements by type, regardless of negationRationale.
|
91
91
|
const results = this.dataElements.filter(element => element._type === `QDM::${profile}` && (isNegated === null || !!element.negationRationale === isNegated));
|
92
92
|
return results.map((result) => {
|
93
|
-
const getCodeFunction = Object.getPrototypeOf(result).getCode;
|
94
|
-
const codeFunction = Object.getPrototypeOf(result).code;
|
95
|
-
const idField = result.id;
|
96
93
|
const removedMongooseItems = AllDataElements[profile](result).toObject();
|
97
|
-
// toObject() will remove all mongoose functions but also
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
removedMongooseItems.id = idField;
|
94
|
+
// toObject() will remove all mongoose functions but also remove the schema methods, so we add them back
|
95
|
+
Object.entries(Object.getPrototypeOf(result).schema.methods).forEach(([method_name, method]) => {
|
96
|
+
removedMongooseItems[method_name] = method;
|
97
|
+
});
|
102
98
|
return removedMongooseItems;
|
103
99
|
});
|
104
100
|
};
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
const { ComponentSchema } = require('./Component');
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|
@@ -6,6 +6,7 @@ const Quantity = require('./basetypes/Quantity');
|
|
6
6
|
const DateTime = require('./basetypes/DateTime');
|
7
7
|
|
8
8
|
const { FacilityLocationSchema } = require('./FacilityLocation');
|
9
|
+
const { IdSchema } = require('./Id');
|
9
10
|
const Any = require('./basetypes/Any');
|
10
11
|
|
11
12
|
const [Number, String] = [
|