@d4l/collect-lib 1.25.0 → 1.26.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/README.md +19 -10
- package/dist/index.d.mts +20 -2
- package/dist/index.d.ts +20 -2
- package/dist/index.js +10 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -861,6 +861,7 @@ var SliderStepSizeExtension = "http://fhir.data4life.care/StructureDefinition/sl
|
|
|
861
861
|
var RelativeMinValueExtension = "http://fhir.data4life.care/StructureDefinition/relative-min-value";
|
|
862
862
|
var RelativeMaxValueExtension = "http://fhir.data4life.care/StructureDefinition/relative-max-value";
|
|
863
863
|
var CustomExtensionStudyName = "http://fhir.data4life.care/StructureDefinition/study-name";
|
|
864
|
+
var CustomExtensionContextValue = "http://fhir.data4life.care/StructureDefinition/context-value";
|
|
864
865
|
var CustomExtensionDate = "http://fhir.data4life.care/StructureDefinition/effective-date";
|
|
865
866
|
var MaxValueExtension = "http://hl7.org/fhir/StructureDefinition/maxValue";
|
|
866
867
|
var MinValueExtension = "http://hl7.org/fhir/StructureDefinition/minValue";
|
|
@@ -1116,11 +1117,16 @@ function generateFHIRResponse(id, {
|
|
|
1116
1117
|
questionnaire,
|
|
1117
1118
|
createdAt,
|
|
1118
1119
|
status,
|
|
1119
|
-
answers
|
|
1120
|
+
answers,
|
|
1121
|
+
context
|
|
1120
1122
|
}) {
|
|
1121
1123
|
const extension = [
|
|
1122
1124
|
{ url: CustomExtensionStudyName, valueString: programName },
|
|
1123
|
-
...effectiveDate ? [{ url: CustomExtensionDate, valueDate: effectiveDate }] : []
|
|
1125
|
+
...effectiveDate ? [{ url: CustomExtensionDate, valueDate: effectiveDate }] : [],
|
|
1126
|
+
...context ? Object.entries(context).map(([key, value]) => ({
|
|
1127
|
+
url: CustomExtensionContextValue,
|
|
1128
|
+
valueString: `${key}=${value}`
|
|
1129
|
+
})) : []
|
|
1124
1130
|
];
|
|
1125
1131
|
return {
|
|
1126
1132
|
id,
|
|
@@ -5703,6 +5709,7 @@ export {
|
|
|
5703
5709
|
ConsentGuard,
|
|
5704
5710
|
ConsentNameSystem,
|
|
5705
5711
|
ConsentVersionSystem,
|
|
5712
|
+
CustomExtensionContextValue,
|
|
5706
5713
|
CustomExtensionDate,
|
|
5707
5714
|
CustomExtensionStudyName,
|
|
5708
5715
|
CustomQuestionSystem,
|