@d4l/collect-lib 1.15.0 → 1.16.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +12 -6
- package/dist/index.d.ts +12 -6
- package/dist/index.js +22 -8
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -8
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -4545,9 +4545,10 @@ function generateFHIRConsent(id, consent, decision, start, end) {
|
|
|
4545
4545
|
};
|
|
4546
4546
|
}
|
|
4547
4547
|
|
|
4548
|
-
// src/fhir/
|
|
4549
|
-
function
|
|
4550
|
-
|
|
4548
|
+
// src/fhir/questionnaireScore.ts
|
|
4549
|
+
function generateQuestionnaireScore(id, data, stringTemplater) {
|
|
4550
|
+
const { questionnaireName, createdAt, value, max, derivedFrom } = data;
|
|
4551
|
+
return __spreadProps(__spreadValues({
|
|
4551
4552
|
id,
|
|
4552
4553
|
resourceType: "Observation",
|
|
4553
4554
|
status: "final",
|
|
@@ -4555,10 +4556,17 @@ function generateFHIREligibility(id, surveyName, createdAt, value, max, stringTe
|
|
|
4555
4556
|
{
|
|
4556
4557
|
url: "http://hl7.org/fhir/StructureDefinition/workflow-adheresTo",
|
|
4557
4558
|
valueCanonical: stringTemplater(
|
|
4558
|
-
`http://{{fhir-base-host}}/r5/Questionnaire/{{program-name}}/${
|
|
4559
|
+
`http://{{fhir-base-host}}/r5/Questionnaire/{{program-name}}/${questionnaireName}|1.0.0`
|
|
4559
4560
|
)
|
|
4560
4561
|
}
|
|
4561
|
-
]
|
|
4562
|
+
]
|
|
4563
|
+
}, derivedFrom && {
|
|
4564
|
+
derivedFrom: [
|
|
4565
|
+
{
|
|
4566
|
+
reference: `QuestionnaireResponse/${derivedFrom}`
|
|
4567
|
+
}
|
|
4568
|
+
]
|
|
4569
|
+
}), {
|
|
4562
4570
|
category: [
|
|
4563
4571
|
{
|
|
4564
4572
|
coding: [
|
|
@@ -4570,7 +4578,13 @@ function generateFHIREligibility(id, surveyName, createdAt, value, max, stringTe
|
|
|
4570
4578
|
}
|
|
4571
4579
|
],
|
|
4572
4580
|
code: {
|
|
4573
|
-
coding: [
|
|
4581
|
+
coding: derivedFrom ? [
|
|
4582
|
+
{
|
|
4583
|
+
system: ObservationTypeSystem,
|
|
4584
|
+
code: "questionnaire_score",
|
|
4585
|
+
display: "Questionnaire score"
|
|
4586
|
+
}
|
|
4587
|
+
] : [
|
|
4574
4588
|
{
|
|
4575
4589
|
system: ObservationTypeSystem,
|
|
4576
4590
|
code: "study_eligibility_score",
|
|
@@ -4592,7 +4606,7 @@ function generateFHIREligibility(id, surveyName, createdAt, value, max, stringTe
|
|
|
4592
4606
|
}
|
|
4593
4607
|
}
|
|
4594
4608
|
]
|
|
4595
|
-
};
|
|
4609
|
+
});
|
|
4596
4610
|
}
|
|
4597
4611
|
|
|
4598
4612
|
// src/fhir/questionnaireResponse.ts
|
|
@@ -5370,13 +5384,13 @@ export {
|
|
|
5370
5384
|
capitalizeFirstLetter,
|
|
5371
5385
|
extractWordsFromRecoveryPhrase,
|
|
5372
5386
|
generateFHIRConsent,
|
|
5373
|
-
generateFHIREligibility,
|
|
5374
5387
|
generateFHIRRecordingBundle,
|
|
5375
5388
|
generateFHIRResearchSubject,
|
|
5376
5389
|
generateFHIRResponse,
|
|
5377
5390
|
generateFHIRSeenDisplay,
|
|
5378
5391
|
generateFHIRTag,
|
|
5379
5392
|
generateQuestionGuard,
|
|
5393
|
+
generateQuestionnaireScore,
|
|
5380
5394
|
generateStepGuard,
|
|
5381
5395
|
generateUrn,
|
|
5382
5396
|
get,
|