@d4l/collect-lib 1.48.0 → 1.49.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 +7 -5
- package/dist/index.d.mts +34 -1
- package/dist/index.d.ts +34 -1
- package/dist/index.js +25 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +24 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1348,6 +1348,11 @@ var QItemControlDefinition = "http://hl7.org/fhir/StructureDefinition/questionna
|
|
|
1348
1348
|
var RoutineIsPassiveExtension = "http://fhir.data4life.care/StructureDefinition/is-passive-recording";
|
|
1349
1349
|
var PrepopulateExtension = "http://fhir.data4life.care/StructureDefinition/prepopulate";
|
|
1350
1350
|
var ImageExtension = "http://hl7.org/fhir/StructureDefinition/questionnaire-itemMedia";
|
|
1351
|
+
var QuestionnaireItemOutputExtension = "http://fhir.data4life.care/StructureDefinition/questionnaire-item-output";
|
|
1352
|
+
var QuestionnaireItemInputExtension = "http://fhir.data4life.care/StructureDefinition/questionnaire-item-input";
|
|
1353
|
+
var TopicInputTopicUrl = "topic";
|
|
1354
|
+
var TopicInputScopeUrl = "scope";
|
|
1355
|
+
var TopicSystem = "http://fhir.data4life.care/topic";
|
|
1351
1356
|
var SignalIDSystem = "http://fhir.data4life.care/r5/NamingSystem/app-signal-ids";
|
|
1352
1357
|
var AppIDNamingSystem = "http://fhir.data4life.care/r5/NamingSystem/app-db-ids";
|
|
1353
1358
|
var SensorTypeSystem = "http://fhir.data4life.care/r5/NamingSystem/sensor-device-type";
|
|
@@ -1428,6 +1433,14 @@ function generateFHIRConsent(id, consent, decision, start, end) {
|
|
|
1428
1433
|
};
|
|
1429
1434
|
}
|
|
1430
1435
|
|
|
1436
|
+
// src/fhir/topic-id.ts
|
|
1437
|
+
var TOPIC_ID_PATTERN = /^[A-Za-z_][A-Za-z0-9_]*$/;
|
|
1438
|
+
var isValidTopicId = (id) => TOPIC_ID_PATTERN.test(id);
|
|
1439
|
+
var topicIdFromCanonical = (canonical) => canonical.substring(canonical.lastIndexOf("/") + 1);
|
|
1440
|
+
var isValidTopicCanonical = (canonical) => isValidTopicId(topicIdFromCanonical(canonical));
|
|
1441
|
+
var TOPIC_SCOPE_CODES = ["session", "latest", "all"];
|
|
1442
|
+
var isValidTopicScope = (code) => TOPIC_SCOPE_CODES.includes(code);
|
|
1443
|
+
|
|
1431
1444
|
// src/fhir/utils.ts
|
|
1432
1445
|
import { v4 as uuid } from "uuid";
|
|
1433
1446
|
function generateUrn() {
|
|
@@ -7371,6 +7384,8 @@ export {
|
|
|
7371
7384
|
PostalCodeFromItemUrl,
|
|
7372
7385
|
PrepopulateExtension,
|
|
7373
7386
|
QItemControlDefinition,
|
|
7387
|
+
QuestionnaireItemInputExtension,
|
|
7388
|
+
QuestionnaireItemOutputExtension,
|
|
7374
7389
|
RECORDING_MODEL_CURRENT_VERSION,
|
|
7375
7390
|
RECORDING_SIGNAL_MODEL_CURRENT_VERSION,
|
|
7376
7391
|
RelativeMaxValueExtension,
|
|
@@ -7391,8 +7406,13 @@ export {
|
|
|
7391
7406
|
StudyNameSystem,
|
|
7392
7407
|
SurveyGuard,
|
|
7393
7408
|
TAG_LENGTH,
|
|
7409
|
+
TOPIC_ID_PATTERN,
|
|
7410
|
+
TOPIC_SCOPE_CODES,
|
|
7394
7411
|
TimeFuncs,
|
|
7395
7412
|
TokenNamingSystem,
|
|
7413
|
+
TopicInputScopeUrl,
|
|
7414
|
+
TopicInputTopicUrl,
|
|
7415
|
+
TopicSystem,
|
|
7396
7416
|
ULID_REGEX,
|
|
7397
7417
|
ULIDtoUUID,
|
|
7398
7418
|
UUID_REGEX,
|
|
@@ -7438,6 +7458,9 @@ export {
|
|
|
7438
7458
|
isNotBeforeStartDate,
|
|
7439
7459
|
isScalarAnswer,
|
|
7440
7460
|
isScoreEligible,
|
|
7461
|
+
isValidTopicCanonical,
|
|
7462
|
+
isValidTopicId,
|
|
7463
|
+
isValidTopicScope,
|
|
7441
7464
|
isYearString,
|
|
7442
7465
|
newStepDateGuard,
|
|
7443
7466
|
overwriteTime,
|
|
@@ -7446,6 +7469,7 @@ export {
|
|
|
7446
7469
|
timezonelessDate,
|
|
7447
7470
|
toDeviceConfig,
|
|
7448
7471
|
toQuestionnaireResponseItem,
|
|
7472
|
+
topicIdFromCanonical,
|
|
7449
7473
|
uint8ArrayToBinaryString,
|
|
7450
7474
|
utf8ToUint8Array,
|
|
7451
7475
|
v4AesKey,
|