gdc-common-utils-ts 2.3.8 → 2.3.9
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/convert/convert-allergy-intolerance.js +15 -1
- package/dist/convert/convert-condition.js +15 -1
- package/dist/convert/convert-diagnostic-report.js +9 -1
- package/dist/convert/convert-flag.js +9 -1
- package/dist/convert/convert-medication-statement.js +11 -3
- package/dist/models/interoperable-claims/allergy-intolerance-claims.d.ts +12 -0
- package/dist/models/interoperable-claims/allergy-intolerance-claims.js +16 -0
- package/dist/models/interoperable-claims/condition-claims.d.ts +12 -0
- package/dist/models/interoperable-claims/condition-claims.js +16 -0
- package/dist/models/interoperable-claims/diagnostic-report-claims.d.ts +3 -0
- package/dist/models/interoperable-claims/diagnostic-report-claims.js +5 -0
- package/dist/models/interoperable-claims/flag-claims.d.ts +3 -0
- package/dist/models/interoperable-claims/flag-claims.js +5 -0
- package/dist/models/interoperable-claims/medication-statement-claims.d.ts +2 -0
- package/dist/models/interoperable-claims/medication-statement-claims.js +2 -0
- package/dist/utils/allergy-intolerance-entry-editor.d.ts +8 -0
- package/dist/utils/allergy-intolerance-entry-editor.js +8 -0
- package/dist/utils/bundle-document-builder.js +5 -0
- package/dist/utils/clinical-resource-converters.js +7 -0
- package/dist/utils/clinical-resource-view.d.ts +22 -4
- package/dist/utils/clinical-resource-view.js +179 -18
- package/dist/utils/condition-entry-editor.d.ts +8 -0
- package/dist/utils/condition-entry-editor.js +8 -0
- package/dist/utils/diagnostic-report-entry-editor.d.ts +8 -0
- package/dist/utils/diagnostic-report-entry-editor.js +16 -0
- package/dist/utils/flag-entry-editor.d.ts +8 -0
- package/dist/utils/flag-entry-editor.js +8 -0
- package/dist/utils/medication-statement-entry-editor.d.ts +8 -0
- package/dist/utils/medication-statement-entry-editor.js +8 -0
- package/fixtures/fhir-ips-bundle-all-sections.json +2381 -0
- package/package.json +6 -2
|
@@ -14,11 +14,11 @@ const GENERIC_ASSERTER_CLAIM_SUFFIX = '.asserter';
|
|
|
14
14
|
/**
|
|
15
15
|
* Maps one bundle entry to a UI-friendly common clinical view contract.
|
|
16
16
|
*/
|
|
17
|
-
export function toClinicalResourceCommonView(entry) {
|
|
17
|
+
export function toClinicalResourceCommonView(entry, options = {}) {
|
|
18
18
|
const claims = readClaims(entry);
|
|
19
19
|
const resourceType = resolveResourceType(entry, claims);
|
|
20
20
|
const resource = entry.resource;
|
|
21
|
-
const title = resolveTitle(resourceType, claims, resource);
|
|
21
|
+
const title = resolveTitle(resourceType, claims, resource, options);
|
|
22
22
|
return {
|
|
23
23
|
title,
|
|
24
24
|
resourceType,
|
|
@@ -34,14 +34,14 @@ export function toClinicalResourceCommonView(entry) {
|
|
|
34
34
|
/**
|
|
35
35
|
* Maps all entries from a Bundle into common clinical views.
|
|
36
36
|
*/
|
|
37
|
-
export function toClinicalResourceCommonViews(bundle) {
|
|
38
|
-
return readBundleEntries(bundle).map((entry) => toClinicalResourceCommonView(entry));
|
|
37
|
+
export function toClinicalResourceCommonViews(bundle, options = {}) {
|
|
38
|
+
return readBundleEntries(bundle).map((entry) => toClinicalResourceCommonView(entry, options));
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
41
|
* Maps one bundle entry to a minimal card view for section counters/list cards.
|
|
42
42
|
*/
|
|
43
|
-
export function toClinicalResourceCardView(entry) {
|
|
44
|
-
const common = toClinicalResourceCommonView(entry);
|
|
43
|
+
export function toClinicalResourceCardView(entry, options = {}) {
|
|
44
|
+
const common = toClinicalResourceCommonView(entry, options);
|
|
45
45
|
return {
|
|
46
46
|
title: common.title,
|
|
47
47
|
resourceType: common.resourceType,
|
|
@@ -53,8 +53,8 @@ export function toClinicalResourceCardView(entry) {
|
|
|
53
53
|
/**
|
|
54
54
|
* Maps all entries from a Bundle into minimal card views.
|
|
55
55
|
*/
|
|
56
|
-
export function toClinicalResourceCardViews(bundle) {
|
|
57
|
-
return readBundleEntries(bundle).map((entry) => toClinicalResourceCardView(entry));
|
|
56
|
+
export function toClinicalResourceCardViews(bundle, options = {}) {
|
|
57
|
+
return readBundleEntries(bundle).map((entry) => toClinicalResourceCardView(entry, options));
|
|
58
58
|
}
|
|
59
59
|
/**
|
|
60
60
|
* Maps one bundle entry to an expanded view that includes XHTML and notes array.
|
|
@@ -128,6 +128,8 @@ export function getLocalTextAndIntDisplay(resource) {
|
|
|
128
128
|
const localText = firstDefinedText([
|
|
129
129
|
resolveResourceCodeText(resource),
|
|
130
130
|
findBySuffix(claims, '.code-text'),
|
|
131
|
+
findBySuffix(claims, '.code-text-local'),
|
|
132
|
+
findBySuffix(claims, '.codetextlocal'),
|
|
131
133
|
findBySuffix(claims, '.medication-text'),
|
|
132
134
|
findBySuffix(claims, '.vaccine-code-text'),
|
|
133
135
|
findBySuffix(claims, '.value-concept-text'),
|
|
@@ -135,6 +137,7 @@ export function getLocalTextAndIntDisplay(resource) {
|
|
|
135
137
|
const internationalDisplay = firstDefinedText([
|
|
136
138
|
resolveResourceCodeDisplay(resource),
|
|
137
139
|
findBySuffix(claims, '.code-display'),
|
|
140
|
+
findBySuffix(claims, '.codedisplay'),
|
|
138
141
|
findBySuffix(claims, '.vaccine-code-display'),
|
|
139
142
|
findBySuffix(claims, '.value-concept-display'),
|
|
140
143
|
]);
|
|
@@ -204,7 +207,7 @@ function resolveResourceType(entry, claims) {
|
|
|
204
207
|
}
|
|
205
208
|
return 'Unknown';
|
|
206
209
|
}
|
|
207
|
-
function resolveTitle(resourceType, claims, resource) {
|
|
210
|
+
function resolveTitle(resourceType, claims, resource, options = {}) {
|
|
208
211
|
if (resourceType === ResourceTypesFhirR4.Communication) {
|
|
209
212
|
return (trimValue(claims[CommunicationClaim.ContentAttachmentTitle])
|
|
210
213
|
|| trimValue(claims[CommunicationClaim.Text])
|
|
@@ -216,20 +219,47 @@ function resolveTitle(resourceType, claims, resource) {
|
|
|
216
219
|
const firstCategory = splitCsv(claims[ClaimConsent.category])[0];
|
|
217
220
|
const firstAction = splitCsv(claims[ClaimConsent.action])[0];
|
|
218
221
|
const firstPurpose = splitCsv(claims[ClaimConsent.purpose])[0];
|
|
219
|
-
|
|
222
|
+
const categoryConcept = asArray(resource?.category)[0];
|
|
223
|
+
return resolveLocalizedCodedTitle({
|
|
224
|
+
resourceType,
|
|
225
|
+
claims,
|
|
226
|
+
resource,
|
|
227
|
+
options,
|
|
228
|
+
concept: categoryConcept,
|
|
229
|
+
token: firstCategory || resolveCodeableConceptToken(categoryConcept),
|
|
230
|
+
}) || humanTitleCandidate(firstAction) || humanTitleCandidate(firstPurpose) || resourceType;
|
|
220
231
|
}
|
|
221
232
|
if (resourceType === ResourceTypesFhirR4.MedicationStatement) {
|
|
222
233
|
const text = firstClaimValue(claims, [
|
|
223
234
|
MedicationStatementClaim.MedicationText,
|
|
224
235
|
MedicationStatementClaimsFhirApi.Medication,
|
|
225
236
|
]);
|
|
237
|
+
const codeText = findFirstClaimBySuffixes(claims, ['.code-text', '.code-text-local', '.codetextlocal']);
|
|
238
|
+
const codeDisplay = findFirstClaimBySuffixes(claims, ['.code-display', '.codedisplay']);
|
|
226
239
|
const firstCode = firstClaimCsvValue(claims, [
|
|
227
240
|
MedicationStatementClaim.Code,
|
|
228
241
|
MedicationStatementClaimsFhirApi.Code,
|
|
229
242
|
]);
|
|
230
|
-
return
|
|
243
|
+
return resolveLocalizedCodedTitle({
|
|
244
|
+
resourceType,
|
|
245
|
+
claims,
|
|
246
|
+
resource,
|
|
247
|
+
options,
|
|
248
|
+
localText: text || codeText,
|
|
249
|
+
internationalDisplay: codeDisplay,
|
|
250
|
+
token: firstCode,
|
|
251
|
+
concept: resource?.medicationCodeableConcept,
|
|
252
|
+
}) || resourceType;
|
|
231
253
|
}
|
|
232
254
|
if (resourceType === ResourceTypesFhirR4.Condition) {
|
|
255
|
+
const codeText = firstClaimValue(claims, [
|
|
256
|
+
ConditionClaim.CodeText,
|
|
257
|
+
ConditionClaimsFhirApi.CodeText,
|
|
258
|
+
]);
|
|
259
|
+
const codeDisplay = firstClaimValue(claims, [
|
|
260
|
+
ConditionClaim.CodeDisplay,
|
|
261
|
+
ConditionClaimsFhirApi.CodeDisplay,
|
|
262
|
+
]);
|
|
233
263
|
const firstCode = firstClaimCsvValue(claims, [
|
|
234
264
|
ConditionClaim.Code,
|
|
235
265
|
ConditionClaimsFhirApi.Code,
|
|
@@ -238,9 +268,26 @@ function resolveTitle(resourceType, claims, resource) {
|
|
|
238
268
|
ConditionClaim.Category,
|
|
239
269
|
ConditionClaimsFhirApi.Category,
|
|
240
270
|
]);
|
|
241
|
-
return
|
|
271
|
+
return resolveLocalizedCodedTitle({
|
|
272
|
+
resourceType,
|
|
273
|
+
claims,
|
|
274
|
+
resource,
|
|
275
|
+
options,
|
|
276
|
+
localText: codeText,
|
|
277
|
+
internationalDisplay: codeDisplay,
|
|
278
|
+
token: firstCode,
|
|
279
|
+
concept: resource?.code,
|
|
280
|
+
}) || humanTitleCandidate(firstCategory) || resourceType;
|
|
242
281
|
}
|
|
243
282
|
if (resourceType === ResourceTypesFhirR4.AllergyIntolerance) {
|
|
283
|
+
const codeText = firstClaimValue(claims, [
|
|
284
|
+
AllergyIntoleranceClaim.CodeText,
|
|
285
|
+
AllergyIntoleranceClaimsFhirApi.CodeText,
|
|
286
|
+
]);
|
|
287
|
+
const codeDisplay = firstClaimValue(claims, [
|
|
288
|
+
AllergyIntoleranceClaim.CodeDisplay,
|
|
289
|
+
AllergyIntoleranceClaimsFhirApi.CodeDisplay,
|
|
290
|
+
]);
|
|
244
291
|
const firstCode = firstClaimCsvValue(claims, [
|
|
245
292
|
AllergyIntoleranceClaim.Code,
|
|
246
293
|
AllergyIntoleranceClaimsFhirApi.Code,
|
|
@@ -249,9 +296,72 @@ function resolveTitle(resourceType, claims, resource) {
|
|
|
249
296
|
AllergyIntoleranceClaim.Category,
|
|
250
297
|
AllergyIntoleranceClaimsFhirApi.Category,
|
|
251
298
|
]);
|
|
252
|
-
return
|
|
253
|
-
|
|
254
|
-
|
|
299
|
+
return resolveLocalizedCodedTitle({
|
|
300
|
+
resourceType,
|
|
301
|
+
claims,
|
|
302
|
+
resource,
|
|
303
|
+
options,
|
|
304
|
+
localText: codeText,
|
|
305
|
+
internationalDisplay: codeDisplay,
|
|
306
|
+
token: firstCode,
|
|
307
|
+
concept: resource?.code,
|
|
308
|
+
}) || humanTitleCandidate(firstCategory) || resourceType;
|
|
309
|
+
}
|
|
310
|
+
const primaryConcept = resolvePrimaryCodeableConcept(resourceType, resource);
|
|
311
|
+
return resolveLocalizedCodedTitle({
|
|
312
|
+
resourceType,
|
|
313
|
+
claims,
|
|
314
|
+
resource,
|
|
315
|
+
options,
|
|
316
|
+
concept: primaryConcept,
|
|
317
|
+
token: resolveCodeableConceptToken(primaryConcept),
|
|
318
|
+
}) || resolveFhirResourceTitle(resourceType, resource) || resourceType;
|
|
319
|
+
}
|
|
320
|
+
function resolveLocalizedCodedTitle(input) {
|
|
321
|
+
const concept = asRecord(input.concept);
|
|
322
|
+
const localText = trimValue(input.localText)
|
|
323
|
+
|| trimValue(concept.text)
|
|
324
|
+
|| findFirstClaimBySuffixes(input.claims, ['.code-text', '.code-text-local', '.codetextlocal']);
|
|
325
|
+
const internationalDisplay = trimValue(input.internationalDisplay)
|
|
326
|
+
|| asArray(concept.coding)
|
|
327
|
+
.map((coding) => trimValue(asRecord(coding).display))
|
|
328
|
+
.find(Boolean)
|
|
329
|
+
|| findFirstClaimBySuffixes(input.claims, ['.code-display', '.codedisplay']);
|
|
330
|
+
const token = trimValue(input.token) || resolveCodeableConceptToken(input.concept);
|
|
331
|
+
const locale = normalizeLanguage(input.options.locale);
|
|
332
|
+
const resourceLanguage = normalizeLanguage(trimValue(input.resource?.language)
|
|
333
|
+
|| findBySuffix(input.claims, '.language'));
|
|
334
|
+
if (!locale) {
|
|
335
|
+
return localText || internationalDisplay || resolveFhirResourceTitle(input.resourceType, input.resource);
|
|
336
|
+
}
|
|
337
|
+
if (resourceLanguage && locale === resourceLanguage && localText) {
|
|
338
|
+
return localText;
|
|
339
|
+
}
|
|
340
|
+
if (locale === 'en') {
|
|
341
|
+
return internationalDisplay || (resourceLanguage === 'en' ? localText : undefined) || localText;
|
|
342
|
+
}
|
|
343
|
+
if (token && input.options.translateCode) {
|
|
344
|
+
const [system, ...codeParts] = token.split('|');
|
|
345
|
+
const code = codeParts.length ? codeParts.join('|') : system;
|
|
346
|
+
const translated = trimValue(input.options.translateCode({
|
|
347
|
+
resourceType: input.resourceType,
|
|
348
|
+
...(codeParts.length ? { system } : {}),
|
|
349
|
+
code,
|
|
350
|
+
token,
|
|
351
|
+
locale,
|
|
352
|
+
}));
|
|
353
|
+
if (translated)
|
|
354
|
+
return translated;
|
|
355
|
+
}
|
|
356
|
+
return internationalDisplay || localText || resolveFhirResourceTitle(input.resourceType, input.resource);
|
|
357
|
+
}
|
|
358
|
+
function normalizeLanguage(value) {
|
|
359
|
+
const normalized = trimValue(value).toLowerCase().replace('_', '-');
|
|
360
|
+
return normalized ? normalized.split('-')[0] : undefined;
|
|
361
|
+
}
|
|
362
|
+
function humanTitleCandidate(value) {
|
|
363
|
+
const normalized = trimValue(value);
|
|
364
|
+
return normalized && !/^\S+\|\S+$/.test(normalized) ? normalized : undefined;
|
|
255
365
|
}
|
|
256
366
|
function resolveIdentifier(resourceType, claims, resource) {
|
|
257
367
|
if (resourceType === ResourceTypesFhirR4.Communication) {
|
|
@@ -499,6 +609,9 @@ function findBySuffix(claims, keySuffix) {
|
|
|
499
609
|
}
|
|
500
610
|
return undefined;
|
|
501
611
|
}
|
|
612
|
+
function findFirstClaimBySuffixes(claims, suffixes) {
|
|
613
|
+
return firstDefinedText(suffixes.map((suffix) => findBySuffix(claims, suffix)));
|
|
614
|
+
}
|
|
502
615
|
function resolveResourceCodeText(resource) {
|
|
503
616
|
return trimValue(asRecord(resource?.code).text) || undefined;
|
|
504
617
|
}
|
|
@@ -512,6 +625,32 @@ function resolveResourceCodeDisplay(resource) {
|
|
|
512
625
|
}
|
|
513
626
|
return undefined;
|
|
514
627
|
}
|
|
628
|
+
function resolvePrimaryCodeableConcept(resourceType, resource) {
|
|
629
|
+
if (!resource)
|
|
630
|
+
return undefined;
|
|
631
|
+
if (resourceType === ResourceTypesFhirR4.MedicationStatement
|
|
632
|
+
|| resourceType === ResourceTypesFhirR4.MedicationRequest
|
|
633
|
+
|| resourceType === ResourceTypesFhirR4.Medication) {
|
|
634
|
+
return resource.medicationCodeableConcept || resource.code;
|
|
635
|
+
}
|
|
636
|
+
if (resourceType === ResourceTypesFhirR4.Immunization)
|
|
637
|
+
return resource.vaccineCode;
|
|
638
|
+
if (resourceType === ResourceTypesFhirR4.Device)
|
|
639
|
+
return resource.type;
|
|
640
|
+
if (resourceType === ResourceTypesFhirR4.DocumentReference)
|
|
641
|
+
return resource.type;
|
|
642
|
+
if (resourceType === ResourceTypesFhirR4.Specimen)
|
|
643
|
+
return resource.type;
|
|
644
|
+
if (resourceType === ResourceTypesFhirR4.ImagingStudy)
|
|
645
|
+
return asArray(resource.procedureCode)[0];
|
|
646
|
+
if (resourceType === ResourceTypesFhirR4.PractitionerRole)
|
|
647
|
+
return asArray(resource.code)[0];
|
|
648
|
+
if (resourceType === ResourceTypesFhirR4.ImmunizationRecommendation) {
|
|
649
|
+
const recommendation = asRecord(asArray(resource.recommendation)[0]);
|
|
650
|
+
return asArray(recommendation.vaccineCode)[0];
|
|
651
|
+
}
|
|
652
|
+
return resource.code || asArray(resource.category)[0];
|
|
653
|
+
}
|
|
515
654
|
function resolveFhirResourceTitle(resourceType, resource) {
|
|
516
655
|
if (!resource) {
|
|
517
656
|
return undefined;
|
|
@@ -540,18 +679,26 @@ function resolveFhirResourceTitle(resourceType, resource) {
|
|
|
540
679
|
if (deviceDisplay)
|
|
541
680
|
return deviceDisplay;
|
|
542
681
|
}
|
|
543
|
-
|
|
682
|
+
if (resourceType === ResourceTypesFhirR4.Practitioner) {
|
|
683
|
+
const humanName = asRecord(asArray(resource.name)[0]);
|
|
684
|
+
const given = asArray(humanName.given).map((value) => trimValue(value)).filter(Boolean);
|
|
685
|
+
const family = trimValue(humanName.family);
|
|
686
|
+
const formatted = [...given, ...(family ? [family] : [])].join(' ').trim();
|
|
687
|
+
if (formatted)
|
|
688
|
+
return formatted;
|
|
689
|
+
}
|
|
690
|
+
codeableConceptCandidates.push(resource.code, resource.title, resource.name, resource.description, resource.summary, resource.scope, resource.category);
|
|
544
691
|
for (const candidate of codeableConceptCandidates) {
|
|
545
692
|
const plainText = trimValue(candidate);
|
|
546
693
|
if (plainText && typeof candidate !== 'object') {
|
|
547
694
|
return plainText;
|
|
548
695
|
}
|
|
549
|
-
const label =
|
|
696
|
+
const label = resolveCodeableConceptPreferredLabel(candidate);
|
|
550
697
|
if (label) {
|
|
551
698
|
return label;
|
|
552
699
|
}
|
|
553
700
|
for (const item of asArray(candidate)) {
|
|
554
|
-
const arrayLabel =
|
|
701
|
+
const arrayLabel = resolveCodeableConceptPreferredLabel(item);
|
|
555
702
|
if (arrayLabel)
|
|
556
703
|
return arrayLabel;
|
|
557
704
|
}
|
|
@@ -657,6 +804,20 @@ function resolveCodeableConceptLabel(value) {
|
|
|
657
804
|
.find(Boolean);
|
|
658
805
|
return buildCombinedLabel(localText, internationalDisplay);
|
|
659
806
|
}
|
|
807
|
+
/**
|
|
808
|
+
* Compact clinical cards show one human label. The local FHIR
|
|
809
|
+
* `CodeableConcept.text` wins; the terminology `Coding.display` is the
|
|
810
|
+
* English/international fallback. `system|code` is never treated as a label.
|
|
811
|
+
*/
|
|
812
|
+
function resolveCodeableConceptPreferredLabel(value) {
|
|
813
|
+
const concept = asRecord(value);
|
|
814
|
+
const localText = trimValue(concept.text) || undefined;
|
|
815
|
+
if (localText)
|
|
816
|
+
return localText;
|
|
817
|
+
return asArray(concept.coding)
|
|
818
|
+
.map((coding) => trimValue(asRecord(coding).display))
|
|
819
|
+
.find(Boolean);
|
|
820
|
+
}
|
|
660
821
|
function resolveCodeableConceptToken(value) {
|
|
661
822
|
const coding = asArray(asRecord(value).coding)
|
|
662
823
|
.map((item) => asRecord(item))
|
|
@@ -13,6 +13,14 @@ export declare class ConditionEntryEditor extends ClinicalResourceEntryEditor {
|
|
|
13
13
|
getSubject(): string | undefined;
|
|
14
14
|
setCode(code?: string | null): this;
|
|
15
15
|
getCode(): string | undefined;
|
|
16
|
+
/** Writes the local-language condition name projected to FHIR `code.text`. */
|
|
17
|
+
setCodeTextLocal(text?: string | null): this;
|
|
18
|
+
/** Reads the local-language condition name. */
|
|
19
|
+
getCodeTextLocal(): string | undefined;
|
|
20
|
+
/** Writes the English/international terminology display. */
|
|
21
|
+
setCodeDisplay(display?: string | null): this;
|
|
22
|
+
/** Reads the English/international terminology display. */
|
|
23
|
+
getCodeDisplay(): string | undefined;
|
|
16
24
|
setClinicalStatus(status?: string | null): this;
|
|
17
25
|
getClinicalStatus(): string | undefined;
|
|
18
26
|
setVerificationStatus(status?: string | null): this;
|
|
@@ -16,6 +16,14 @@ export class ConditionEntryEditor extends ClinicalResourceEntryEditor {
|
|
|
16
16
|
getSubject() { return this.getSubjectClaims(ConditionClaim.Subject, ConditionClaim.Subject); }
|
|
17
17
|
setCode(code) { return this.setScalarClaim(ConditionClaim.Code, code); }
|
|
18
18
|
getCode() { return this.getScalarClaim(ConditionClaim.Code); }
|
|
19
|
+
/** Writes the local-language condition name projected to FHIR `code.text`. */
|
|
20
|
+
setCodeTextLocal(text) { return this.setScalarClaim(ConditionClaim.CodeText, text); }
|
|
21
|
+
/** Reads the local-language condition name. */
|
|
22
|
+
getCodeTextLocal() { return this.getScalarClaim(ConditionClaim.CodeText); }
|
|
23
|
+
/** Writes the English/international terminology display. */
|
|
24
|
+
setCodeDisplay(display) { return this.setScalarClaim(ConditionClaim.CodeDisplay, display); }
|
|
25
|
+
/** Reads the English/international terminology display. */
|
|
26
|
+
getCodeDisplay() { return this.getScalarClaim(ConditionClaim.CodeDisplay); }
|
|
19
27
|
setClinicalStatus(status) { return this.setScalarClaim(ConditionClaim.ClinicalStatus, status); }
|
|
20
28
|
getClinicalStatus() { return this.getScalarClaim(ConditionClaim.ClinicalStatus); }
|
|
21
29
|
setVerificationStatus(status) { return this.setScalarClaim(ConditionClaim.VerificationStatus, status); }
|
|
@@ -39,6 +39,14 @@ export declare class DiagnosticReportEntryEditor extends ClinicalResourceEntryEd
|
|
|
39
39
|
setCode(code?: string | null): this;
|
|
40
40
|
/** Returns the main report code. */
|
|
41
41
|
getCode(): string | undefined;
|
|
42
|
+
/** Sets the local-language report name projected to FHIR `code.text`. */
|
|
43
|
+
setCodeTextLocal(text?: string | null): this;
|
|
44
|
+
/** Returns the local-language report name. */
|
|
45
|
+
getCodeTextLocal(): string | undefined;
|
|
46
|
+
/** Sets the English/international terminology display. */
|
|
47
|
+
setCodeDisplay(display?: string | null): this;
|
|
48
|
+
/** Returns the English/international terminology display. */
|
|
49
|
+
getCodeDisplay(): string | undefined;
|
|
42
50
|
/** Sets the encounter reference linked to this report. */
|
|
43
51
|
setEncounter(reference?: string | null): this;
|
|
44
52
|
/** Returns the encounter reference linked to this report. */
|
|
@@ -68,6 +68,22 @@ export class DiagnosticReportEntryEditor extends ClinicalResourceEntryEditor {
|
|
|
68
68
|
getCode() {
|
|
69
69
|
return this.getScalarClaim(DiagnosticReportClaim.Code);
|
|
70
70
|
}
|
|
71
|
+
/** Sets the local-language report name projected to FHIR `code.text`. */
|
|
72
|
+
setCodeTextLocal(text) {
|
|
73
|
+
return this.setScalarClaim(DiagnosticReportClaim.CodeText, text);
|
|
74
|
+
}
|
|
75
|
+
/** Returns the local-language report name. */
|
|
76
|
+
getCodeTextLocal() {
|
|
77
|
+
return this.getScalarClaim(DiagnosticReportClaim.CodeText);
|
|
78
|
+
}
|
|
79
|
+
/** Sets the English/international terminology display. */
|
|
80
|
+
setCodeDisplay(display) {
|
|
81
|
+
return this.setScalarClaim(DiagnosticReportClaim.CodeDisplay, display);
|
|
82
|
+
}
|
|
83
|
+
/** Returns the English/international terminology display. */
|
|
84
|
+
getCodeDisplay() {
|
|
85
|
+
return this.getScalarClaim(DiagnosticReportClaim.CodeDisplay);
|
|
86
|
+
}
|
|
71
87
|
/** Sets the encounter reference linked to this report. */
|
|
72
88
|
setEncounter(reference) {
|
|
73
89
|
return this.setScalarClaim(DiagnosticReportClaim.Encounter, reference);
|
|
@@ -28,6 +28,14 @@ export declare class FlagEntryEditor extends ClinicalResourceEntryEditor {
|
|
|
28
28
|
setCode(value?: string | null): this;
|
|
29
29
|
/** Reads the flag code. */
|
|
30
30
|
getCode(): string | undefined;
|
|
31
|
+
/** Writes the local-language alert name projected to FHIR `code.text`. */
|
|
32
|
+
setCodeTextLocal(value?: string | null): this;
|
|
33
|
+
/** Reads the local-language alert name. */
|
|
34
|
+
getCodeTextLocal(): string | undefined;
|
|
35
|
+
/** Writes the English/international terminology display. */
|
|
36
|
+
setCodeDisplay(value?: string | null): this;
|
|
37
|
+
/** Reads the English/international terminology display. */
|
|
38
|
+
getCodeDisplay(): string | undefined;
|
|
31
39
|
/** Writes the flag date. */
|
|
32
40
|
setDate(value?: string | null): this;
|
|
33
41
|
/** Reads the flag date. */
|
|
@@ -31,6 +31,14 @@ export class FlagEntryEditor extends ClinicalResourceEntryEditor {
|
|
|
31
31
|
setCode(value) { return this.setScalarClaim(FlagClaim.Code, value); }
|
|
32
32
|
/** Reads the flag code. */
|
|
33
33
|
getCode() { return this.getScalarClaim(FlagClaim.Code); }
|
|
34
|
+
/** Writes the local-language alert name projected to FHIR `code.text`. */
|
|
35
|
+
setCodeTextLocal(value) { return this.setScalarClaim(FlagClaim.CodeText, value); }
|
|
36
|
+
/** Reads the local-language alert name. */
|
|
37
|
+
getCodeTextLocal() { return this.getScalarClaim(FlagClaim.CodeText); }
|
|
38
|
+
/** Writes the English/international terminology display. */
|
|
39
|
+
setCodeDisplay(value) { return this.setScalarClaim(FlagClaim.CodeDisplay, value); }
|
|
40
|
+
/** Reads the English/international terminology display. */
|
|
41
|
+
getCodeDisplay() { return this.getScalarClaim(FlagClaim.CodeDisplay); }
|
|
34
42
|
/** Writes the flag date. */
|
|
35
43
|
setDate(value) { return this.setScalarClaim(FlagClaim.Date, value); }
|
|
36
44
|
/** Reads the flag date. */
|
|
@@ -39,6 +39,14 @@ export declare class MedicationStatementEntryEditor extends ClinicalResourceEntr
|
|
|
39
39
|
setMedicationText(text?: string | null): this;
|
|
40
40
|
/** Returns the human-readable medication text. */
|
|
41
41
|
getMedicationText(): string | undefined;
|
|
42
|
+
/** Alias used consistently by coded IPS editors for local FHIR text. */
|
|
43
|
+
setCodeTextLocal(text?: string | null): this;
|
|
44
|
+
/** Returns the local-language medication text. */
|
|
45
|
+
getCodeTextLocal(): string | undefined;
|
|
46
|
+
/** Sets the English/international terminology display. */
|
|
47
|
+
setCodeDisplay(display?: string | null): this;
|
|
48
|
+
/** Returns the English/international terminology display. */
|
|
49
|
+
getCodeDisplay(): string | undefined;
|
|
42
50
|
/** Sets one free-text note attached to the medication entry. */
|
|
43
51
|
setNote(note?: string | null): this;
|
|
44
52
|
/** Returns the current medication note. */
|
|
@@ -42,6 +42,14 @@ export class MedicationStatementEntryEditor extends ClinicalResourceEntryEditor
|
|
|
42
42
|
setMedicationText(text) { return this.setScalarClaim(MedicationStatementClaim.MedicationText, text); }
|
|
43
43
|
/** Returns the human-readable medication text. */
|
|
44
44
|
getMedicationText() { return this.getScalarClaim(MedicationStatementClaim.MedicationText); }
|
|
45
|
+
/** Alias used consistently by coded IPS editors for local FHIR text. */
|
|
46
|
+
setCodeTextLocal(text) { return this.setMedicationText(text); }
|
|
47
|
+
/** Returns the local-language medication text. */
|
|
48
|
+
getCodeTextLocal() { return this.getMedicationText(); }
|
|
49
|
+
/** Sets the English/international terminology display. */
|
|
50
|
+
setCodeDisplay(display) { return this.setScalarClaim(MedicationStatementClaim.CodeDisplay, display); }
|
|
51
|
+
/** Returns the English/international terminology display. */
|
|
52
|
+
getCodeDisplay() { return this.getScalarClaim(MedicationStatementClaim.CodeDisplay); }
|
|
45
53
|
/** Sets one free-text note attached to the medication entry. */
|
|
46
54
|
setNote(note) { return this.setScalarClaim(MedicationStatementClaim.Note, note); }
|
|
47
55
|
/** Returns the current medication note. */
|