sdc-qrf 0.3.26 → 0.3.27
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/converter/fceToFhir/questionnaireResponse/processReference.d.ts.map +1 -1
- package/dist/converter/fceToFhir/questionnaireResponse/processReference.js +7 -9
- package/dist/converter/fceToFhir/questionnaireResponse/processReference.js.map +1 -1
- package/dist/converter/index.d.ts +1 -1
- package/dist/converter/index.d.ts.map +1 -1
- package/dist/converter/index.js +6 -2
- package/dist/converter/index.js.map +1 -1
- package/package.json +1 -1
- package/src/converter/__tests__/reference.test.ts +31 -0
- package/src/converter/fceToFhir/questionnaireResponse/processReference.ts +11 -20
- package/src/converter/index.ts +7 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processReference.d.ts","sourceRoot":"","sources":["../../../../src/converter/fceToFhir/questionnaireResponse/processReference.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,IAAI,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAE9E,OAAO,EAAE,qBAAqB,IAAI,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"processReference.d.ts","sourceRoot":"","sources":["../../../../src/converter/fceToFhir/questionnaireResponse/processReference.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,IAAI,yBAAyB,EAAE,MAAM,UAAU,CAAC;AAE9E,OAAO,EAAE,qBAAqB,IAAI,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAGhG,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,wBAAwB,GAAG,yBAAyB,CAgB3F"}
|
|
@@ -2,20 +2,18 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.processReference = processReference;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
|
+
const index_1 = require("../../index");
|
|
5
6
|
function processReference(fceQR) {
|
|
6
7
|
const { encounter, source, subject } = fceQR, commonProperties = tslib_1.__rest(fceQR, ["encounter", "source", "subject"]);
|
|
7
8
|
const fhirQuestionnaireResponse = commonProperties;
|
|
8
|
-
if (encounter
|
|
9
|
-
|
|
10
|
-
fhirQuestionnaireResponse.encounter = Object.assign({ reference: `${resourceType}/${id}` }, encounterProperties);
|
|
9
|
+
if (encounter) {
|
|
10
|
+
fhirQuestionnaireResponse.encounter = (0, index_1.toFHIRReference)(encounter);
|
|
11
11
|
}
|
|
12
|
-
if (source
|
|
13
|
-
|
|
14
|
-
fhirQuestionnaireResponse.source = Object.assign({ reference: `${resourceType}/${id}` }, sourceProperties);
|
|
12
|
+
if (source) {
|
|
13
|
+
fhirQuestionnaireResponse.source = (0, index_1.toFHIRReference)(source);
|
|
15
14
|
}
|
|
16
|
-
if (subject
|
|
17
|
-
|
|
18
|
-
fhirQuestionnaireResponse.subject = Object.assign({ reference: `${resourceType}/${id}` }, subjectProperties);
|
|
15
|
+
if (subject) {
|
|
16
|
+
fhirQuestionnaireResponse.subject = (0, index_1.toFHIRReference)(subject);
|
|
19
17
|
}
|
|
20
18
|
return fhirQuestionnaireResponse;
|
|
21
19
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"processReference.js","sourceRoot":"","sources":["../../../../src/converter/fceToFhir/questionnaireResponse/processReference.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"processReference.js","sourceRoot":"","sources":["../../../../src/converter/fceToFhir/questionnaireResponse/processReference.ts"],"names":[],"mappings":";;AAKA,4CAgBC;;AAlBD,uCAA8C;AAE9C,SAAgB,gBAAgB,CAAC,KAA+B;IAC5D,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,KAA0B,KAAK,EAA1B,gBAAgB,kBAAK,KAAK,EAA3D,kCAAmD,CAAQ,CAAC;IAClE,MAAM,yBAAyB,GAA8B,gBAA6C,CAAC;IAC3G,IAAI,SAAS,EAAE,CAAC;QACZ,yBAAyB,CAAC,SAAS,GAAG,IAAA,uBAAe,EAAC,SAAS,CAAC,CAAC;IACrE,CAAC;IAED,IAAI,MAAM,EAAE,CAAC;QACT,yBAAyB,CAAC,MAAM,GAAG,IAAA,uBAAe,EAAC,MAAM,CAAC,CAAC;IAC/D,CAAC;IAED,IAAI,OAAO,EAAE,CAAC;QACV,yBAAyB,CAAC,OAAO,GAAG,IAAA,uBAAe,EAAC,OAAO,CAAC,CAAC;IACjE,CAAC;IAED,OAAO,yBAAyB,CAAC;AACrC,CAAC"}
|
|
@@ -9,6 +9,6 @@ export declare function convertToFHIRExtension(item: FCEQuestionnaireItem): FHIR
|
|
|
9
9
|
export declare function extractExtension(extension: FCEExtension[] | undefined, url: 'ex:createdAt'): string | undefined;
|
|
10
10
|
export declare function filterExtensions(item: FHIRQuestionnaireItem, url: string): FHIRExtension[] | undefined;
|
|
11
11
|
export declare function fromFHIRReference(r?: FHIRReference): InternalReference | undefined;
|
|
12
|
-
export declare function toFHIRReference(r?: InternalReference): FHIRReference | undefined;
|
|
12
|
+
export declare function toFHIRReference(r?: InternalReference | FHIRReference): FHIRReference | undefined;
|
|
13
13
|
export { toFirstClassExtension, toFirstClassExtensionV2, fromFirstClassExtension, fromFirstClassExtensionV2, processLaunchContextToFce, };
|
|
14
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/converter/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,SAAS,IAAI,aAAa,EAC1B,SAAS,IAAI,aAAa,EAC1B,iBAAiB,IAAI,qBAAqB,EAC7C,MAAM,UAAU,CAAC;AAElB,OAAO,EACH,SAAS,IAAI,YAAY,EACzB,iBAAiB,IAAI,oBAAoB,EACzC,iBAAiB,EACpB,MAAM,6BAA6B,CAAC;AAGrC,OAAO,EAAE,uBAAuB,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AACjF,OAAO,EAAE,qBAAqB,EAAE,uBAAuB,EAAE,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EACvB,uBAAuB,EACvB,yBAAyB,EACzB,yBAAyB,GAC5B,CAAC"}
|
package/dist/converter/index.js
CHANGED
|
@@ -84,8 +84,12 @@ function toFHIRReference(r) {
|
|
|
84
84
|
if (!r) {
|
|
85
85
|
return undefined;
|
|
86
86
|
}
|
|
87
|
-
|
|
87
|
+
// @ts-expect-error(handles for both types of references)
|
|
88
|
+
const { id, resourceType, reference } = r, commonReferenceProperties = tslib_1.__rest(r, ["id", "resourceType", "reference"]);
|
|
89
|
+
// @ts-expect-error(resource is defined for internal reference only)
|
|
88
90
|
delete commonReferenceProperties.resource;
|
|
89
|
-
return Object.assign(Object.assign({}, commonReferenceProperties), {
|
|
91
|
+
return Object.assign(Object.assign({}, commonReferenceProperties), {
|
|
92
|
+
// This function will work both with FHIR and Aidbox references
|
|
93
|
+
reference: reference !== null && reference !== void 0 ? reference : `${resourceType}/${id}` });
|
|
90
94
|
}
|
|
91
95
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/converter/index.ts"],"names":[],"mappings":";;;AAkBA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/converter/index.ts"],"names":[],"mappings":";;;AAkBA,4DAcC;AAED,wDAqBC;AAED,4CAEC;AAED,4CAEC;AAED,8CA4BC;AAED,0CAgBC;;AAnGD,6CAA0E;AAC1E,2CAAiF;AAuG7E,wGAvGK,mCAAuB,OAuGL;AACvB,0GAxG8B,qCAAyB,OAwG9B;AAvG7B,2CAA6E;AAoGzE,sGApGK,iCAAqB,OAoGL;AACrB,wGArG4B,mCAAuB,OAqG5B;AApG3B,mFAAgH;AAuG5G,0GAvG6B,wCAAyB,OAuG7B;AAtG7B,kDAAwB;AAExB,SAAgB,wBAAwB,CAAC,UAA2B;IAChE,MAAM,UAAU,GAAG,UAAU,CAAC,CAAC,CAAE,CAAC,GAAG,CAAC;IACtC,MAAM,WAAW,GAAG,kCAA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,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC;QAEhE,uCACO,yBAAyB,KAC5B,EAAE,EAAE,EAAG,EACP,YAAY,IACd;IACN,CAAC;SAAM,CAAC;QACJ,MAAM,CAAC,EAAE,EAAE,YAAY,CAAC,GAAG,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,CAAC;QAE5D,uCACO,yBAAyB,KAC5B,EAAE,EAAE,EAAG,EACP,YAAY,IACd;IACN,CAAC;AACL,CAAC;AAED,SAAgB,eAAe,CAAC,CAAqC;IACjE,IAAI,CAAC,CAAC,EAAE,CAAC;QACL,OAAO,SAAS,CAAC;IACrB,CAAC;IAED,yDAAyD;IACzD,MAAM,EAAE,EAAE,EAAE,YAAY,EAAE,SAAS,KAAmC,CAAC,EAA/B,yBAAyB,kBAAK,CAAC,EAAjE,mCAA6D,CAAI,CAAC;IAExE,oEAAoE;IACpE,OAAO,yBAAyB,CAAC,QAAQ,CAAC;IAE1C,uCACO,yBAAyB;QAC5B,+DAA+D;QAC/D,SAAS,EAAE,SAAS,aAAT,SAAS,cAAT,SAAS,GAAI,GAAG,YAAY,IAAI,EAAE,EAAE,IACjD;AACN,CAAC"}
|
package/package.json
CHANGED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { describe, expect, test } from 'vitest';
|
|
2
|
+
import { Reference } from 'fhir/r4';
|
|
3
|
+
import { InternalReference } from '@beda.software/aidbox-types';
|
|
4
|
+
import { toFHIRReference } from '../index';
|
|
5
|
+
|
|
6
|
+
describe('toFHIRReference', () => {
|
|
7
|
+
test('should convert Aidbox reference to FHIR reference', () => {
|
|
8
|
+
const sourceReference: InternalReference = {
|
|
9
|
+
id: '123',
|
|
10
|
+
resourceType: 'Patient',
|
|
11
|
+
display: 'John Doe',
|
|
12
|
+
};
|
|
13
|
+
const actualReference = toFHIRReference(sourceReference);
|
|
14
|
+
expect(actualReference).toEqual({
|
|
15
|
+
reference: 'Patient/123',
|
|
16
|
+
display: 'John Doe',
|
|
17
|
+
});
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
test('should convert FHIR reference to FHIR reference', () => {
|
|
21
|
+
const sourceReference: Reference = {
|
|
22
|
+
reference: 'Patient/123',
|
|
23
|
+
display: 'John Doe',
|
|
24
|
+
};
|
|
25
|
+
const actualReference = toFHIRReference(sourceReference);
|
|
26
|
+
expect(actualReference).toEqual({
|
|
27
|
+
reference: 'Patient/123',
|
|
28
|
+
display: 'John Doe',
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
});
|
|
@@ -1,31 +1,22 @@
|
|
|
1
1
|
import { QuestionnaireResponse as FHIRQuestionnaireResponse } from 'fhir/r4b';
|
|
2
2
|
|
|
3
3
|
import { QuestionnaireResponse as FCEQuestionnaireResponse } from '@beda.software/aidbox-types';
|
|
4
|
+
import { toFHIRReference } from '../../index';
|
|
4
5
|
|
|
5
6
|
export function processReference(fceQR: FCEQuestionnaireResponse): FHIRQuestionnaireResponse {
|
|
6
7
|
const { encounter, source, subject, ...commonProperties } = fceQR;
|
|
7
|
-
const fhirQuestionnaireResponse: FHIRQuestionnaireResponse =
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const { id, resourceType, ...encounterProperties } = encounter;
|
|
11
|
-
fhirQuestionnaireResponse.encounter = {
|
|
12
|
-
reference: `${resourceType}/${id}`,
|
|
13
|
-
...encounterProperties,
|
|
14
|
-
};
|
|
8
|
+
const fhirQuestionnaireResponse: FHIRQuestionnaireResponse = commonProperties as FHIRQuestionnaireResponse;
|
|
9
|
+
if (encounter) {
|
|
10
|
+
fhirQuestionnaireResponse.encounter = toFHIRReference(encounter);
|
|
15
11
|
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
fhirQuestionnaireResponse.source =
|
|
19
|
-
reference: `${resourceType}/${id}`,
|
|
20
|
-
...sourceProperties,
|
|
21
|
-
};
|
|
12
|
+
|
|
13
|
+
if (source) {
|
|
14
|
+
fhirQuestionnaireResponse.source = toFHIRReference(source);
|
|
22
15
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
fhirQuestionnaireResponse.subject =
|
|
26
|
-
reference: `${resourceType}/${id}`,
|
|
27
|
-
...subjectProperties,
|
|
28
|
-
};
|
|
16
|
+
|
|
17
|
+
if (subject) {
|
|
18
|
+
fhirQuestionnaireResponse.subject = toFHIRReference(subject);
|
|
29
19
|
}
|
|
20
|
+
|
|
30
21
|
return fhirQuestionnaireResponse;
|
|
31
22
|
}
|
package/src/converter/index.ts
CHANGED
|
@@ -16,9 +16,7 @@ import { toFirstClassExtension, toFirstClassExtensionV2 } from './fhirToFce';
|
|
|
16
16
|
import { processLaunchContext as processLaunchContextToFce } from './fhirToFce/questionnaire/processExtensions';
|
|
17
17
|
export * from './utils';
|
|
18
18
|
|
|
19
|
-
export function convertFromFHIRExtension(
|
|
20
|
-
extensions: FHIRExtension[],
|
|
21
|
-
): Partial<FCEQuestionnaireItem> | undefined {
|
|
19
|
+
export function convertFromFHIRExtension(extensions: FHIRExtension[]): Partial<FCEQuestionnaireItem> | undefined {
|
|
22
20
|
const identifier = extensions[0]!.url;
|
|
23
21
|
const transformer = extensionTransformers[identifier as ExtensionIdentifier];
|
|
24
22
|
if (transformer !== undefined) {
|
|
@@ -95,18 +93,21 @@ export function fromFHIRReference(r?: FHIRReference): InternalReference | undefi
|
|
|
95
93
|
}
|
|
96
94
|
}
|
|
97
95
|
|
|
98
|
-
export function toFHIRReference(r?: InternalReference): FHIRReference | undefined {
|
|
96
|
+
export function toFHIRReference(r?: InternalReference | FHIRReference): FHIRReference | undefined {
|
|
99
97
|
if (!r) {
|
|
100
98
|
return undefined;
|
|
101
99
|
}
|
|
102
100
|
|
|
103
|
-
|
|
101
|
+
// @ts-expect-error(handles for both types of references)
|
|
102
|
+
const { id, resourceType, reference, ...commonReferenceProperties } = r;
|
|
104
103
|
|
|
104
|
+
// @ts-expect-error(resource is defined for internal reference only)
|
|
105
105
|
delete commonReferenceProperties.resource;
|
|
106
106
|
|
|
107
107
|
return {
|
|
108
108
|
...commonReferenceProperties,
|
|
109
|
-
|
|
109
|
+
// This function will work both with FHIR and Aidbox references
|
|
110
|
+
reference: reference ?? `${resourceType}/${id}`,
|
|
110
111
|
};
|
|
111
112
|
}
|
|
112
113
|
|