@d4l/collect-lib 1.59.1 → 1.60.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 +11 -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 +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.js +95 -117
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +69 -91
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -1
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
|
|
@@ -868,8 +931,11 @@ import { Buffer } from "buffer/";
|
|
|
868
931
|
var DATA_SOURCE_BYTE_SIZE = 16;
|
|
869
932
|
var APPLE_HEALTH_DATA_SOURCES = ["apple-watch", "iphone", "unknown"];
|
|
870
933
|
var HEALTH_CONNECT_DATA_SOURCES = [
|
|
871
|
-
"
|
|
934
|
+
"garmin",
|
|
872
935
|
"google-fit",
|
|
936
|
+
"google-health",
|
|
937
|
+
"internal-sensor",
|
|
938
|
+
"oura",
|
|
873
939
|
"samsung-health",
|
|
874
940
|
"unknown"
|
|
875
941
|
];
|
|
@@ -1805,88 +1871,6 @@ function isFlatAnswer(answer) {
|
|
|
1805
1871
|
|
|
1806
1872
|
// src/fhir/consent.ts
|
|
1807
1873
|
import { Buffer as Buffer2 } from "buffer/";
|
|
1808
|
-
|
|
1809
|
-
// src/fhir/constants.ts
|
|
1810
|
-
var SliderMinLabelExtension = "http://fhir.data4life.care/StructureDefinition/slider-label-min";
|
|
1811
|
-
var SliderMaxLabelExtension = "http://fhir.data4life.care/StructureDefinition/slider-label-max";
|
|
1812
|
-
var SliderStepSizeExtension = "http://fhir.data4life.care/StructureDefinition/slider-step-size";
|
|
1813
|
-
var SliderOrientationExtension = "http://fhir.data4life.care/StructureDefinition/slider-orientation";
|
|
1814
|
-
var SliderInputLabel = "http://fhir.data4life.care/StructureDefinition/slider-input-label";
|
|
1815
|
-
var RelativeMinValueExtension = "http://fhir.data4life.care/StructureDefinition/relative-min-value";
|
|
1816
|
-
var RelativeMaxValueExtension = "http://fhir.data4life.care/StructureDefinition/relative-max-value";
|
|
1817
|
-
var CustomExtensionStudyName = "http://fhir.data4life.care/StructureDefinition/study-name";
|
|
1818
|
-
var CustomExtensionContextValue = "http://fhir.data4life.care/StructureDefinition/context-value";
|
|
1819
|
-
var CustomExtensionDate = "http://fhir.data4life.care/StructureDefinition/effective-date";
|
|
1820
|
-
var MaxValueExtension = "http://hl7.org/fhir/StructureDefinition/maxValue";
|
|
1821
|
-
var MinValueExtension = "http://hl7.org/fhir/StructureDefinition/minValue";
|
|
1822
|
-
var MinLengthExtension = "http://hl7.org/fhir/StructureDefinition/minLength";
|
|
1823
|
-
var QItemControlDefinition = "http://hl7.org/fhir/StructureDefinition/questionnaire-itemControl";
|
|
1824
|
-
var RoutineIsPassiveExtension = "http://fhir.data4life.care/StructureDefinition/is-passive-recording";
|
|
1825
|
-
var PrepopulateExtension = "http://fhir.data4life.care/StructureDefinition/prepopulate";
|
|
1826
|
-
var ImageExtension = "http://hl7.org/fhir/StructureDefinition/questionnaire-itemMedia";
|
|
1827
|
-
var QuestionnaireItemOutputExtension = "http://fhir.data4life.care/StructureDefinition/questionnaire-item-output";
|
|
1828
|
-
var QuestionnaireItemInputExtension = "http://fhir.data4life.care/StructureDefinition/questionnaire-item-input";
|
|
1829
|
-
var TopicInputTopicUrl = "topic";
|
|
1830
|
-
var TopicInputScopeUrl = "scope";
|
|
1831
|
-
var TopicSystem = "http://fhir.data4life.care/topic";
|
|
1832
|
-
var QuestionnaireItemVariableExtension = "http://fhir.data4life.care/StructureDefinition/questionnaire-item-variable";
|
|
1833
|
-
var ItemVariableNameUrl = "name";
|
|
1834
|
-
var ItemVariableTopicUrl = "topic";
|
|
1835
|
-
var ItemVariableQuestionUrl = "question";
|
|
1836
|
-
var ItemVariableScopeUrl = "scope";
|
|
1837
|
-
var EnableWhenExpressionExtension = "http://hl7.org/fhir/uv/sdc/StructureDefinition/sdc-questionnaire-enableWhenExpression";
|
|
1838
|
-
var FhirPathLanguage = "text/fhirpath";
|
|
1839
|
-
var SignalIDSystem = "http://fhir.data4life.care/r5/NamingSystem/app-signal-ids";
|
|
1840
|
-
var AppIDNamingSystem = "http://fhir.data4life.care/r5/NamingSystem/app-db-ids";
|
|
1841
|
-
var SensorTypeSystem = "http://fhir.data4life.care/r5/NamingSystem/sensor-device-type";
|
|
1842
|
-
var SensorIdentifierSystem = "http://fhir.data4life.care/r5/NamingSystem/sensor-peripheral-id";
|
|
1843
|
-
var TokenNamingSystem = "http://fhir.data4life.care/r5/NamingSystem/participation-token";
|
|
1844
|
-
var ConsentNameSystem = "http://fhir.data4life.care/r5/NamingSystem/consent-name";
|
|
1845
|
-
var ConsentVersionSystem = "http://fhir.data4life.care/r5/NamingSystem/consent-version";
|
|
1846
|
-
var ObservationTypeSystem = "http://fhir.data4life.care/r5/CodeSystem/observation-types";
|
|
1847
|
-
var MeasurementTypeSystem = "http://fhir.data4life.care/r5/CodeSystem/sensor-measurement-types";
|
|
1848
|
-
var StudyNameSystem = "http://fhir.data4life.care/r5/CodeSystem/study-name";
|
|
1849
|
-
var SensorSettingsSystem = "http://fhir.data4life.care/r5/CodeSystem/sensor-settings";
|
|
1850
|
-
var CustomQuestionSystem = "http://fhir.data4life.care/r5/CodeSystem/custom-question-class";
|
|
1851
|
-
var CommunicationTypeSystem = "http://fhir.data4life.care/r5/CodeSystem/communication-types";
|
|
1852
|
-
var CountryValueSet = "http://hl7.org/fhir/ValueSet/iso3166-1-2";
|
|
1853
|
-
var Iso3166CodeSystem = "urn:iso:std:iso:3166";
|
|
1854
|
-
var PostalCodeCountrySourceExtension = "http://fhir.data4life.care/fhir/StructureDefinition/postalcode-country-source";
|
|
1855
|
-
var PostalCodeFromItemUrl = "fromItem";
|
|
1856
|
-
var PostalCodeFixedCountryUrl = "fixedCountry";
|
|
1857
|
-
var DEVICE_LABEL_CODING = {
|
|
1858
|
-
system: SensorSettingsSystem,
|
|
1859
|
-
code: "device_label",
|
|
1860
|
-
display: "Device label"
|
|
1861
|
-
};
|
|
1862
|
-
var DEVICE_DISPLAY_LABEL_CODING = {
|
|
1863
|
-
system: SensorSettingsSystem,
|
|
1864
|
-
code: "display_label",
|
|
1865
|
-
display: "Display Label"
|
|
1866
|
-
};
|
|
1867
|
-
var DEVICE_OUTPUT_RATE_CODING = {
|
|
1868
|
-
system: "urn:iso:std:iso:11073:10101",
|
|
1869
|
-
code: "68320",
|
|
1870
|
-
display: "MDC_ATTR_SAMPLE_RATE"
|
|
1871
|
-
};
|
|
1872
|
-
var DEVICE_SENSOR_DELAY_CODING = {
|
|
1873
|
-
system: SensorSettingsSystem,
|
|
1874
|
-
code: "sensor_delay",
|
|
1875
|
-
display: "Sensor delay"
|
|
1876
|
-
};
|
|
1877
|
-
var SIGNAL_DURATION_CODING = {
|
|
1878
|
-
system: "http://loinc.org",
|
|
1879
|
-
code: "8838-5",
|
|
1880
|
-
display: "Observation duration"
|
|
1881
|
-
};
|
|
1882
|
-
var ANDROID_SENSORS_CONSTANT_NAMES = [
|
|
1883
|
-
"SENSOR_DELAY_FASTEST",
|
|
1884
|
-
"SENSOR_DELAY_GAME",
|
|
1885
|
-
"SENSOR_DELAY_UI",
|
|
1886
|
-
"SENSOR_DELAY_NORMAL"
|
|
1887
|
-
];
|
|
1888
|
-
|
|
1889
|
-
// src/fhir/consent.ts
|
|
1890
1874
|
function generateFHIRConsent(id, consent, decision, start, end) {
|
|
1891
1875
|
return {
|
|
1892
1876
|
id,
|
|
@@ -1916,14 +1900,6 @@ function generateFHIRConsent(id, consent, decision, start, end) {
|
|
|
1916
1900
|
};
|
|
1917
1901
|
}
|
|
1918
1902
|
|
|
1919
|
-
// src/fhir/topic-id.ts
|
|
1920
|
-
var TOPIC_ID_PATTERN = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
1921
|
-
var isValidTopicId = (id) => TOPIC_ID_PATTERN.test(id);
|
|
1922
|
-
var topicIdFromCanonical = (canonical) => canonical.substring(canonical.lastIndexOf("/") + 1);
|
|
1923
|
-
var isValidTopicCanonical = (canonical) => isValidTopicId(topicIdFromCanonical(canonical));
|
|
1924
|
-
var TOPIC_SCOPE_CODES = ["session", "latest", "all"];
|
|
1925
|
-
var isValidTopicScope = (code) => TOPIC_SCOPE_CODES.includes(code);
|
|
1926
|
-
|
|
1927
1903
|
// src/fhir/enable-when-expression.ts
|
|
1928
1904
|
var SUPPORTED_FHIRPATH_OPERATORS = [
|
|
1929
1905
|
"and",
|
|
@@ -8868,6 +8844,7 @@ export {
|
|
|
8868
8844
|
PSMSPPGIRAnnotation,
|
|
8869
8845
|
PSMSPPGRedAnnotation,
|
|
8870
8846
|
PSMSSkinTemperatureAnnotation,
|
|
8847
|
+
PlaceholderExtension,
|
|
8871
8848
|
PostalCodeCountrySourceExtension,
|
|
8872
8849
|
PostalCodeFixedCountryUrl,
|
|
8873
8850
|
PostalCodeFromItemUrl,
|
|
@@ -8916,6 +8893,7 @@ export {
|
|
|
8916
8893
|
UUIDtoULID,
|
|
8917
8894
|
V4_DECRYPTER_DATA_RECEIVER,
|
|
8918
8895
|
V4_DECRYPTER_MOBILE_APP,
|
|
8896
|
+
ValuesetSortingExtension,
|
|
8919
8897
|
WORDLIST_LANGUAGES,
|
|
8920
8898
|
WearOS3AnnotationMap,
|
|
8921
8899
|
WebConverter,
|