@d4l/collect-lib 1.59.2 → 1.61.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/LICENSE.md +18 -5
- package/README.md +11 -0
- package/THIRD_PARTY_NOTICES +48 -0
- package/dist/chunk-3XMHVH6M.mjs +154 -0
- package/dist/chunk-3XMHVH6M.mjs.map +1 -0
- package/dist/chunk-HL7CNZCJ.js +154 -0
- package/dist/chunk-HL7CNZCJ.js.map +1 -0
- package/dist/fhir-to-questions.d.mts +43 -0
- package/dist/fhir-to-questions.d.ts +43 -0
- package/dist/fhir-to-questions.js +509 -0
- package/dist/fhir-to-questions.js.map +1 -0
- package/dist/fhir-to-questions.mjs +509 -0
- package/dist/fhir-to-questions.mjs.map +1 -0
- package/dist/index.d.mts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +91 -116
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +65 -90
- package/dist/index.mjs.map +1 -1
- package/package.json +11 -4
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,66 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ANDROID_SENSORS_CONSTANT_NAMES,
|
|
3
|
+
AppIDNamingSystem,
|
|
4
|
+
CommunicationTypeSystem,
|
|
5
|
+
ConsentNameSystem,
|
|
6
|
+
ConsentVersionSystem,
|
|
7
|
+
CountryValueSet,
|
|
8
|
+
CustomExtensionContextValue,
|
|
9
|
+
CustomExtensionDate,
|
|
10
|
+
CustomExtensionStudyName,
|
|
11
|
+
CustomQuestionSystem,
|
|
12
|
+
DEVICE_DISPLAY_LABEL_CODING,
|
|
13
|
+
DEVICE_LABEL_CODING,
|
|
14
|
+
DEVICE_OUTPUT_RATE_CODING,
|
|
15
|
+
DEVICE_SENSOR_DELAY_CODING,
|
|
16
|
+
EnableWhenExpressionExtension,
|
|
17
|
+
FhirPathLanguage,
|
|
18
|
+
ImageExtension,
|
|
19
|
+
Iso3166CodeSystem,
|
|
20
|
+
ItemVariableNameUrl,
|
|
21
|
+
ItemVariableQuestionUrl,
|
|
22
|
+
ItemVariableScopeUrl,
|
|
23
|
+
ItemVariableTopicUrl,
|
|
24
|
+
MaxValueExtension,
|
|
25
|
+
MeasurementTypeSystem,
|
|
26
|
+
MinLengthExtension,
|
|
27
|
+
MinValueExtension,
|
|
28
|
+
ObservationTypeSystem,
|
|
29
|
+
PlaceholderExtension,
|
|
30
|
+
PostalCodeCountrySourceExtension,
|
|
31
|
+
PostalCodeFixedCountryUrl,
|
|
32
|
+
PostalCodeFromItemUrl,
|
|
33
|
+
PrepopulateExtension,
|
|
34
|
+
QItemControlDefinition,
|
|
35
|
+
QuestionnaireItemInputExtension,
|
|
36
|
+
QuestionnaireItemOutputExtension,
|
|
37
|
+
QuestionnaireItemVariableExtension,
|
|
38
|
+
RelativeMaxValueExtension,
|
|
39
|
+
RelativeMinValueExtension,
|
|
40
|
+
RoutineIsPassiveExtension,
|
|
41
|
+
SIGNAL_DURATION_CODING,
|
|
42
|
+
SensorIdentifierSystem,
|
|
43
|
+
SensorSettingsSystem,
|
|
44
|
+
SensorTypeSystem,
|
|
45
|
+
SignalIDSystem,
|
|
46
|
+
SliderInputLabel,
|
|
47
|
+
SliderMaxLabelExtension,
|
|
48
|
+
SliderMinLabelExtension,
|
|
49
|
+
SliderOrientationExtension,
|
|
50
|
+
SliderStepSizeExtension,
|
|
51
|
+
StudyNameSystem,
|
|
52
|
+
TOPIC_ID_PATTERN,
|
|
53
|
+
TOPIC_SCOPE_CODES,
|
|
54
|
+
TokenNamingSystem,
|
|
55
|
+
TopicInputScopeUrl,
|
|
56
|
+
TopicInputTopicUrl,
|
|
57
|
+
TopicSystem,
|
|
58
|
+
ValuesetSortingExtension,
|
|
59
|
+
isValidTopicCanonical,
|
|
60
|
+
isValidTopicId,
|
|
61
|
+
isValidTopicScope,
|
|
62
|
+
topicIdFromCanonical
|
|
63
|
+
} from "./chunk-3XMHVH6M.mjs";
|
|
1
64
|
import {
|
|
2
65
|
__spreadProps,
|
|
3
66
|
__spreadValues
|
|
@@ -1808,88 +1871,6 @@ function isFlatAnswer(answer) {
|
|
|
1808
1871
|
|
|
1809
1872
|
// src/fhir/consent.ts
|
|
1810
1873
|
import { Buffer as Buffer2 } from "buffer/";
|
|
1811
|
-
|
|
1812
|
-
// src/fhir/constants.ts
|
|
1813
|
-
var SliderMinLabelExtension = "http://fhir.data4life.care/StructureDefinition/slider-label-min";
|
|
1814
|
-
var SliderMaxLabelExtension = "http://fhir.data4life.care/StructureDefinition/slider-label-max";
|
|
1815
|
-
var SliderStepSizeExtension = "http://fhir.data4life.care/StructureDefinition/slider-step-size";
|
|
1816
|
-
var SliderOrientationExtension = "http://fhir.data4life.care/StructureDefinition/slider-orientation";
|
|
1817
|
-
var SliderInputLabel = "http://fhir.data4life.care/StructureDefinition/slider-input-label";
|
|
1818
|
-
var RelativeMinValueExtension = "http://fhir.data4life.care/StructureDefinition/relative-min-value";
|
|
1819
|
-
var RelativeMaxValueExtension = "http://fhir.data4life.care/StructureDefinition/relative-max-value";
|
|
1820
|
-
var CustomExtensionStudyName = "http://fhir.data4life.care/StructureDefinition/study-name";
|
|
1821
|
-
var CustomExtensionContextValue = "http://fhir.data4life.care/StructureDefinition/context-value";
|
|
1822
|
-
var CustomExtensionDate = "http://fhir.data4life.care/StructureDefinition/effective-date";
|
|
1823
|
-
var MaxValueExtension = "http://hl7.org/fhir/StructureDefinition/maxValue";
|
|
1824
|
-
var MinValueExtension = "http://hl7.org/fhir/StructureDefinition/minValue";
|
|
1825
|
-
var MinLengthExtension = "http://hl7.org/fhir/StructureDefinition/minLength";
|
|
1826
|
-
var QItemControlDefinition = "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl";
|
|
1827
|
-
var RoutineIsPassiveExtension = "http://fhir.data4life.care/StructureDefinition/is-passive-recording";
|
|
1828
|
-
var PrepopulateExtension = "http://fhir.data4life.care/StructureDefinition/prepopulate";
|
|
1829
|
-
var ImageExtension = "http://hl7.org/fhir/StructureDefinition/questionnaire-itemMedia";
|
|
1830
|
-
var QuestionnaireItemOutputExtension = "http://fhir.data4life.care/StructureDefinition/questionnaire-item-output";
|
|
1831
|
-
var QuestionnaireItemInputExtension = "http://fhir.data4life.care/StructureDefinition/questionnaire-item-input";
|
|
1832
|
-
var TopicInputTopicUrl = "topic";
|
|
1833
|
-
var TopicInputScopeUrl = "scope";
|
|
1834
|
-
var TopicSystem = "http://fhir.data4life.care/topic";
|
|
1835
|
-
var QuestionnaireItemVariableExtension = "http://fhir.data4life.care/StructureDefinition/questionnaire-item-variable";
|
|
1836
|
-
var ItemVariableNameUrl = "name";
|
|
1837
|
-
var ItemVariableTopicUrl = "topic";
|
|
1838
|
-
var ItemVariableQuestionUrl = "question";
|
|
1839
|
-
var ItemVariableScopeUrl = "scope";
|
|
1840
|
-
var EnableWhenExpressionExtension = "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression";
|
|
1841
|
-
var FhirPathLanguage = "text/fhirpath";
|
|
1842
|
-
var SignalIDSystem = "http://fhir.data4life.care/r5/NamingSystem/app-signal-ids";
|
|
1843
|
-
var AppIDNamingSystem = "http://fhir.data4life.care/r5/NamingSystem/app-db-ids";
|
|
1844
|
-
var SensorTypeSystem = "http://fhir.data4life.care/r5/NamingSystem/sensor-device-type";
|
|
1845
|
-
var SensorIdentifierSystem = "http://fhir.data4life.care/r5/NamingSystem/sensor-peripheral-id";
|
|
1846
|
-
var TokenNamingSystem = "http://fhir.data4life.care/r5/NamingSystem/participation-token";
|
|
1847
|
-
var ConsentNameSystem = "http://fhir.data4life.care/r5/NamingSystem/consent-name";
|
|
1848
|
-
var ConsentVersionSystem = "http://fhir.data4life.care/r5/NamingSystem/consent-version";
|
|
1849
|
-
var ObservationTypeSystem = "http://fhir.data4life.care/r5/CodeSystem/observation-types";
|
|
1850
|
-
var MeasurementTypeSystem = "http://fhir.data4life.care/r5/CodeSystem/sensor-measurement-types";
|
|
1851
|
-
var StudyNameSystem = "http://fhir.data4life.care/r5/CodeSystem/study-name";
|
|
1852
|
-
var SensorSettingsSystem = "http://fhir.data4life.care/r5/CodeSystem/sensor-settings";
|
|
1853
|
-
var CustomQuestionSystem = "http://fhir.data4life.care/r5/CodeSystem/custom-question-class";
|
|
1854
|
-
var CommunicationTypeSystem = "http://fhir.data4life.care/r5/CodeSystem/communication-types";
|
|
1855
|
-
var CountryValueSet = "http://hl7.org/fhir/ValueSet/iso3166-1-2";
|
|
1856
|
-
var Iso3166CodeSystem = "urn:iso:std:iso:3166";
|
|
1857
|
-
var PostalCodeCountrySourceExtension = "http://fhir.data4life.care/fhir/StructureDefinition/postalcode-country-source";
|
|
1858
|
-
var PostalCodeFromItemUrl = "fromItem";
|
|
1859
|
-
var PostalCodeFixedCountryUrl = "fixedCountry";
|
|
1860
|
-
var DEVICE_LABEL_CODING = {
|
|
1861
|
-
system: SensorSettingsSystem,
|
|
1862
|
-
code: "device_label",
|
|
1863
|
-
display: "Device label"
|
|
1864
|
-
};
|
|
1865
|
-
var DEVICE_DISPLAY_LABEL_CODING = {
|
|
1866
|
-
system: SensorSettingsSystem,
|
|
1867
|
-
code: "display_label",
|
|
1868
|
-
display: "Display Label"
|
|
1869
|
-
};
|
|
1870
|
-
var DEVICE_OUTPUT_RATE_CODING = {
|
|
1871
|
-
system: "urn:iso:std:iso:11073:10101",
|
|
1872
|
-
code: "68320",
|
|
1873
|
-
display: "MDC_ATTR_SAMPLE_RATE"
|
|
1874
|
-
};
|
|
1875
|
-
var DEVICE_SENSOR_DELAY_CODING = {
|
|
1876
|
-
system: SensorSettingsSystem,
|
|
1877
|
-
code: "sensor_delay",
|
|
1878
|
-
display: "Sensor delay"
|
|
1879
|
-
};
|
|
1880
|
-
var SIGNAL_DURATION_CODING = {
|
|
1881
|
-
system: "http://loinc.org",
|
|
1882
|
-
code: "8838-5",
|
|
1883
|
-
display: "Observation duration"
|
|
1884
|
-
};
|
|
1885
|
-
var ANDROID_SENSORS_CONSTANT_NAMES = [
|
|
1886
|
-
"SENSOR_DELAY_FASTEST",
|
|
1887
|
-
"SENSOR_DELAY_GAME",
|
|
1888
|
-
"SENSOR_DELAY_UI",
|
|
1889
|
-
"SENSOR_DELAY_NORMAL"
|
|
1890
|
-
];
|
|
1891
|
-
|
|
1892
|
-
// src/fhir/consent.ts
|
|
1893
1874
|
function generateFHIRConsent(id, consent, decision, start, end) {
|
|
1894
1875
|
return {
|
|
1895
1876
|
id,
|
|
@@ -1919,14 +1900,6 @@ function generateFHIRConsent(id, consent, decision, start, end) {
|
|
|
1919
1900
|
};
|
|
1920
1901
|
}
|
|
1921
1902
|
|
|
1922
|
-
// src/fhir/topic-id.ts
|
|
1923
|
-
var TOPIC_ID_PATTERN = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
1924
|
-
var isValidTopicId = (id) => TOPIC_ID_PATTERN.test(id);
|
|
1925
|
-
var topicIdFromCanonical = (canonical) => canonical.substring(canonical.lastIndexOf("/") + 1);
|
|
1926
|
-
var isValidTopicCanonical = (canonical) => isValidTopicId(topicIdFromCanonical(canonical));
|
|
1927
|
-
var TOPIC_SCOPE_CODES = ["session", "latest", "all"];
|
|
1928
|
-
var isValidTopicScope = (code) => TOPIC_SCOPE_CODES.includes(code);
|
|
1929
|
-
|
|
1930
1903
|
// src/fhir/enable-when-expression.ts
|
|
1931
1904
|
var SUPPORTED_FHIRPATH_OPERATORS = [
|
|
1932
1905
|
"and",
|
|
@@ -8871,6 +8844,7 @@ export {
|
|
|
8871
8844
|
PSMSPPGIRAnnotation,
|
|
8872
8845
|
PSMSPPGRedAnnotation,
|
|
8873
8846
|
PSMSSkinTemperatureAnnotation,
|
|
8847
|
+
PlaceholderExtension,
|
|
8874
8848
|
PostalCodeCountrySourceExtension,
|
|
8875
8849
|
PostalCodeFixedCountryUrl,
|
|
8876
8850
|
PostalCodeFromItemUrl,
|
|
@@ -8919,6 +8893,7 @@ export {
|
|
|
8919
8893
|
UUIDtoULID,
|
|
8920
8894
|
V4_DECRYPTER_DATA_RECEIVER,
|
|
8921
8895
|
V4_DECRYPTER_MOBILE_APP,
|
|
8896
|
+
ValuesetSortingExtension,
|
|
8922
8897
|
WORDLIST_LANGUAGES,
|
|
8923
8898
|
WearOS3AnnotationMap,
|
|
8924
8899
|
WebConverter,
|