gdc-common-utils-ts 2.3.8 → 2.3.10

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.
Files changed (31) hide show
  1. package/dist/convert/convert-allergy-intolerance.js +15 -1
  2. package/dist/convert/convert-condition.js +15 -1
  3. package/dist/convert/convert-diagnostic-report.js +9 -1
  4. package/dist/convert/convert-flag.js +9 -1
  5. package/dist/convert/convert-medication-statement.js +11 -3
  6. package/dist/models/interoperable-claims/allergy-intolerance-claims.d.ts +12 -0
  7. package/dist/models/interoperable-claims/allergy-intolerance-claims.js +16 -0
  8. package/dist/models/interoperable-claims/condition-claims.d.ts +12 -0
  9. package/dist/models/interoperable-claims/condition-claims.js +16 -0
  10. package/dist/models/interoperable-claims/diagnostic-report-claims.d.ts +3 -0
  11. package/dist/models/interoperable-claims/diagnostic-report-claims.js +5 -0
  12. package/dist/models/interoperable-claims/flag-claims.d.ts +3 -0
  13. package/dist/models/interoperable-claims/flag-claims.js +5 -0
  14. package/dist/models/interoperable-claims/medication-statement-claims.d.ts +2 -0
  15. package/dist/models/interoperable-claims/medication-statement-claims.js +2 -0
  16. package/dist/utils/allergy-intolerance-entry-editor.d.ts +8 -0
  17. package/dist/utils/allergy-intolerance-entry-editor.js +8 -0
  18. package/dist/utils/bundle-document-builder.js +5 -0
  19. package/dist/utils/clinical-resource-converters.js +7 -0
  20. package/dist/utils/clinical-resource-view.d.ts +25 -6
  21. package/dist/utils/clinical-resource-view.js +183 -21
  22. package/dist/utils/condition-entry-editor.d.ts +8 -0
  23. package/dist/utils/condition-entry-editor.js +8 -0
  24. package/dist/utils/diagnostic-report-entry-editor.d.ts +8 -0
  25. package/dist/utils/diagnostic-report-entry-editor.js +16 -0
  26. package/dist/utils/flag-entry-editor.d.ts +8 -0
  27. package/dist/utils/flag-entry-editor.js +8 -0
  28. package/dist/utils/medication-statement-entry-editor.d.ts +8 -0
  29. package/dist/utils/medication-statement-entry-editor.js +8 -0
  30. package/fixtures/fhir-ips-bundle-all-sections.json +2381 -0
  31. 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.
@@ -78,9 +78,10 @@ export function toClinicalResourceExpandedViews(bundle) {
78
78
  *
79
79
  * The Composition is authoritative for grouping. Resource type is deliberately
80
80
  * not used to guess a section because Observation and supporting resources can
81
- * be referenced from several IPS sections.
81
+ * be referenced from several IPS sections. Display options are propagated to
82
+ * every generated card.
82
83
  */
83
- export function toClinicalSectionViews(bundle) {
84
+ export function toClinicalSectionViews(bundle, options = {}) {
84
85
  const entries = readBundleEntries(bundle);
85
86
  const composition = entries.find((entry) => entry.resource?.resourceType === ResourceTypesFhirR4.Composition);
86
87
  if (!composition?.resource) {
@@ -113,7 +114,7 @@ export function toClinicalSectionViews(bundle) {
113
114
  ...(resolveCodeableConceptLabel(section.emptyReason)
114
115
  ? { emptyReason: resolveCodeableConceptLabel(section.emptyReason) }
115
116
  : {}),
116
- resources: resolvedEntries.map((entry) => toClinicalResourceCardView(entry)),
117
+ resources: resolvedEntries.map((entry) => toClinicalResourceCardView(entry, options)),
117
118
  unresolvedReferences,
118
119
  };
119
120
  });
@@ -128,6 +129,8 @@ export function getLocalTextAndIntDisplay(resource) {
128
129
  const localText = firstDefinedText([
129
130
  resolveResourceCodeText(resource),
130
131
  findBySuffix(claims, '.code-text'),
132
+ findBySuffix(claims, '.code-text-local'),
133
+ findBySuffix(claims, '.codetextlocal'),
131
134
  findBySuffix(claims, '.medication-text'),
132
135
  findBySuffix(claims, '.vaccine-code-text'),
133
136
  findBySuffix(claims, '.value-concept-text'),
@@ -135,6 +138,7 @@ export function getLocalTextAndIntDisplay(resource) {
135
138
  const internationalDisplay = firstDefinedText([
136
139
  resolveResourceCodeDisplay(resource),
137
140
  findBySuffix(claims, '.code-display'),
141
+ findBySuffix(claims, '.codedisplay'),
138
142
  findBySuffix(claims, '.vaccine-code-display'),
139
143
  findBySuffix(claims, '.value-concept-display'),
140
144
  ]);
@@ -204,7 +208,7 @@ function resolveResourceType(entry, claims) {
204
208
  }
205
209
  return 'Unknown';
206
210
  }
207
- function resolveTitle(resourceType, claims, resource) {
211
+ function resolveTitle(resourceType, claims, resource, options = {}) {
208
212
  if (resourceType === ResourceTypesFhirR4.Communication) {
209
213
  return (trimValue(claims[CommunicationClaim.ContentAttachmentTitle])
210
214
  || trimValue(claims[CommunicationClaim.Text])
@@ -216,20 +220,47 @@ function resolveTitle(resourceType, claims, resource) {
216
220
  const firstCategory = splitCsv(claims[ClaimConsent.category])[0];
217
221
  const firstAction = splitCsv(claims[ClaimConsent.action])[0];
218
222
  const firstPurpose = splitCsv(claims[ClaimConsent.purpose])[0];
219
- return firstCategory || firstAction || firstPurpose || resolveFhirResourceTitle(resourceType, resource) || resourceType;
223
+ const categoryConcept = asArray(resource?.category)[0];
224
+ return resolveLocalizedCodedTitle({
225
+ resourceType,
226
+ claims,
227
+ resource,
228
+ options,
229
+ concept: categoryConcept,
230
+ token: firstCategory || resolveCodeableConceptToken(categoryConcept),
231
+ }) || humanTitleCandidate(firstAction) || humanTitleCandidate(firstPurpose) || resourceType;
220
232
  }
221
233
  if (resourceType === ResourceTypesFhirR4.MedicationStatement) {
222
234
  const text = firstClaimValue(claims, [
223
235
  MedicationStatementClaim.MedicationText,
224
236
  MedicationStatementClaimsFhirApi.Medication,
225
237
  ]);
238
+ const codeText = findFirstClaimBySuffixes(claims, ['.code-text', '.code-text-local', '.codetextlocal']);
239
+ const codeDisplay = findFirstClaimBySuffixes(claims, ['.code-display', '.codedisplay']);
226
240
  const firstCode = firstClaimCsvValue(claims, [
227
241
  MedicationStatementClaim.Code,
228
242
  MedicationStatementClaimsFhirApi.Code,
229
243
  ]);
230
- return text || firstCode || resolveFhirResourceTitle(resourceType, resource) || resourceType;
244
+ return resolveLocalizedCodedTitle({
245
+ resourceType,
246
+ claims,
247
+ resource,
248
+ options,
249
+ localText: text || codeText,
250
+ internationalDisplay: codeDisplay,
251
+ token: firstCode,
252
+ concept: resource?.medicationCodeableConcept,
253
+ }) || resourceType;
231
254
  }
232
255
  if (resourceType === ResourceTypesFhirR4.Condition) {
256
+ const codeText = firstClaimValue(claims, [
257
+ ConditionClaim.CodeText,
258
+ ConditionClaimsFhirApi.CodeText,
259
+ ]);
260
+ const codeDisplay = firstClaimValue(claims, [
261
+ ConditionClaim.CodeDisplay,
262
+ ConditionClaimsFhirApi.CodeDisplay,
263
+ ]);
233
264
  const firstCode = firstClaimCsvValue(claims, [
234
265
  ConditionClaim.Code,
235
266
  ConditionClaimsFhirApi.Code,
@@ -238,9 +269,26 @@ function resolveTitle(resourceType, claims, resource) {
238
269
  ConditionClaim.Category,
239
270
  ConditionClaimsFhirApi.Category,
240
271
  ]);
241
- return firstCode || firstCategory || resolveFhirResourceTitle(resourceType, resource) || resourceType;
272
+ return resolveLocalizedCodedTitle({
273
+ resourceType,
274
+ claims,
275
+ resource,
276
+ options,
277
+ localText: codeText,
278
+ internationalDisplay: codeDisplay,
279
+ token: firstCode,
280
+ concept: resource?.code,
281
+ }) || humanTitleCandidate(firstCategory) || resourceType;
242
282
  }
243
283
  if (resourceType === ResourceTypesFhirR4.AllergyIntolerance) {
284
+ const codeText = firstClaimValue(claims, [
285
+ AllergyIntoleranceClaim.CodeText,
286
+ AllergyIntoleranceClaimsFhirApi.CodeText,
287
+ ]);
288
+ const codeDisplay = firstClaimValue(claims, [
289
+ AllergyIntoleranceClaim.CodeDisplay,
290
+ AllergyIntoleranceClaimsFhirApi.CodeDisplay,
291
+ ]);
244
292
  const firstCode = firstClaimCsvValue(claims, [
245
293
  AllergyIntoleranceClaim.Code,
246
294
  AllergyIntoleranceClaimsFhirApi.Code,
@@ -249,9 +297,72 @@ function resolveTitle(resourceType, claims, resource) {
249
297
  AllergyIntoleranceClaim.Category,
250
298
  AllergyIntoleranceClaimsFhirApi.Category,
251
299
  ]);
252
- return firstCode || firstCategory || resolveFhirResourceTitle(resourceType, resource) || resourceType;
253
- }
254
- return resolveFhirResourceTitle(resourceType, resource) || resourceType;
300
+ return resolveLocalizedCodedTitle({
301
+ resourceType,
302
+ claims,
303
+ resource,
304
+ options,
305
+ localText: codeText,
306
+ internationalDisplay: codeDisplay,
307
+ token: firstCode,
308
+ concept: resource?.code,
309
+ }) || humanTitleCandidate(firstCategory) || resourceType;
310
+ }
311
+ const primaryConcept = resolvePrimaryCodeableConcept(resourceType, resource);
312
+ return resolveLocalizedCodedTitle({
313
+ resourceType,
314
+ claims,
315
+ resource,
316
+ options,
317
+ concept: primaryConcept,
318
+ token: resolveCodeableConceptToken(primaryConcept),
319
+ }) || resolveFhirResourceTitle(resourceType, resource) || resourceType;
320
+ }
321
+ function resolveLocalizedCodedTitle(input) {
322
+ const concept = asRecord(input.concept);
323
+ const localText = trimValue(input.localText)
324
+ || trimValue(concept.text)
325
+ || findFirstClaimBySuffixes(input.claims, ['.code-text', '.code-text-local', '.codetextlocal']);
326
+ const internationalDisplay = trimValue(input.internationalDisplay)
327
+ || asArray(concept.coding)
328
+ .map((coding) => trimValue(asRecord(coding).display))
329
+ .find(Boolean)
330
+ || findFirstClaimBySuffixes(input.claims, ['.code-display', '.codedisplay']);
331
+ const token = trimValue(input.token) || resolveCodeableConceptToken(input.concept);
332
+ const locale = normalizeLanguage(input.options.locale);
333
+ const resourceLanguage = normalizeLanguage(trimValue(input.resource?.language)
334
+ || findBySuffix(input.claims, '.language'));
335
+ if (!locale) {
336
+ return localText || internationalDisplay || resolveFhirResourceTitle(input.resourceType, input.resource);
337
+ }
338
+ if (resourceLanguage && locale === resourceLanguage && localText) {
339
+ return localText;
340
+ }
341
+ if (locale === 'en') {
342
+ return internationalDisplay || (resourceLanguage === 'en' ? localText : undefined) || localText;
343
+ }
344
+ if (token && input.options.translateCode) {
345
+ const [system, ...codeParts] = token.split('|');
346
+ const code = codeParts.length ? codeParts.join('|') : system;
347
+ const translated = trimValue(input.options.translateCode({
348
+ resourceType: input.resourceType,
349
+ ...(codeParts.length ? { system } : {}),
350
+ code,
351
+ token,
352
+ locale,
353
+ }));
354
+ if (translated)
355
+ return translated;
356
+ }
357
+ return internationalDisplay || localText || resolveFhirResourceTitle(input.resourceType, input.resource);
358
+ }
359
+ function normalizeLanguage(value) {
360
+ const normalized = trimValue(value).toLowerCase().replace('_', '-');
361
+ return normalized ? normalized.split('-')[0] : undefined;
362
+ }
363
+ function humanTitleCandidate(value) {
364
+ const normalized = trimValue(value);
365
+ return normalized && !/^\S+\|\S+$/.test(normalized) ? normalized : undefined;
255
366
  }
256
367
  function resolveIdentifier(resourceType, claims, resource) {
257
368
  if (resourceType === ResourceTypesFhirR4.Communication) {
@@ -499,6 +610,9 @@ function findBySuffix(claims, keySuffix) {
499
610
  }
500
611
  return undefined;
501
612
  }
613
+ function findFirstClaimBySuffixes(claims, suffixes) {
614
+ return firstDefinedText(suffixes.map((suffix) => findBySuffix(claims, suffix)));
615
+ }
502
616
  function resolveResourceCodeText(resource) {
503
617
  return trimValue(asRecord(resource?.code).text) || undefined;
504
618
  }
@@ -512,6 +626,32 @@ function resolveResourceCodeDisplay(resource) {
512
626
  }
513
627
  return undefined;
514
628
  }
629
+ function resolvePrimaryCodeableConcept(resourceType, resource) {
630
+ if (!resource)
631
+ return undefined;
632
+ if (resourceType === ResourceTypesFhirR4.MedicationStatement
633
+ || resourceType === ResourceTypesFhirR4.MedicationRequest
634
+ || resourceType === ResourceTypesFhirR4.Medication) {
635
+ return resource.medicationCodeableConcept || resource.code;
636
+ }
637
+ if (resourceType === ResourceTypesFhirR4.Immunization)
638
+ return resource.vaccineCode;
639
+ if (resourceType === ResourceTypesFhirR4.Device)
640
+ return resource.type;
641
+ if (resourceType === ResourceTypesFhirR4.DocumentReference)
642
+ return resource.type;
643
+ if (resourceType === ResourceTypesFhirR4.Specimen)
644
+ return resource.type;
645
+ if (resourceType === ResourceTypesFhirR4.ImagingStudy)
646
+ return asArray(resource.procedureCode)[0];
647
+ if (resourceType === ResourceTypesFhirR4.PractitionerRole)
648
+ return asArray(resource.code)[0];
649
+ if (resourceType === ResourceTypesFhirR4.ImmunizationRecommendation) {
650
+ const recommendation = asRecord(asArray(resource.recommendation)[0]);
651
+ return asArray(recommendation.vaccineCode)[0];
652
+ }
653
+ return resource.code || asArray(resource.category)[0];
654
+ }
515
655
  function resolveFhirResourceTitle(resourceType, resource) {
516
656
  if (!resource) {
517
657
  return undefined;
@@ -540,18 +680,26 @@ function resolveFhirResourceTitle(resourceType, resource) {
540
680
  if (deviceDisplay)
541
681
  return deviceDisplay;
542
682
  }
543
- codeableConceptCandidates.push(resource.code, resource.title, resource.name, resource.description, resource.scope, resource.category);
683
+ if (resourceType === ResourceTypesFhirR4.Practitioner) {
684
+ const humanName = asRecord(asArray(resource.name)[0]);
685
+ const given = asArray(humanName.given).map((value) => trimValue(value)).filter(Boolean);
686
+ const family = trimValue(humanName.family);
687
+ const formatted = [...given, ...(family ? [family] : [])].join(' ').trim();
688
+ if (formatted)
689
+ return formatted;
690
+ }
691
+ codeableConceptCandidates.push(resource.code, resource.title, resource.name, resource.description, resource.summary, resource.scope, resource.category);
544
692
  for (const candidate of codeableConceptCandidates) {
545
693
  const plainText = trimValue(candidate);
546
694
  if (plainText && typeof candidate !== 'object') {
547
695
  return plainText;
548
696
  }
549
- const label = resolveCodeableConceptLabel(candidate);
697
+ const label = resolveCodeableConceptPreferredLabel(candidate);
550
698
  if (label) {
551
699
  return label;
552
700
  }
553
701
  for (const item of asArray(candidate)) {
554
- const arrayLabel = resolveCodeableConceptLabel(item);
702
+ const arrayLabel = resolveCodeableConceptPreferredLabel(item);
555
703
  if (arrayLabel)
556
704
  return arrayLabel;
557
705
  }
@@ -657,6 +805,20 @@ function resolveCodeableConceptLabel(value) {
657
805
  .find(Boolean);
658
806
  return buildCombinedLabel(localText, internationalDisplay);
659
807
  }
808
+ /**
809
+ * Compact clinical cards show one human label. The local FHIR
810
+ * `CodeableConcept.text` wins; the terminology `Coding.display` is the
811
+ * English/international fallback. `system|code` is never treated as a label.
812
+ */
813
+ function resolveCodeableConceptPreferredLabel(value) {
814
+ const concept = asRecord(value);
815
+ const localText = trimValue(concept.text) || undefined;
816
+ if (localText)
817
+ return localText;
818
+ return asArray(concept.coding)
819
+ .map((coding) => trimValue(asRecord(coding).display))
820
+ .find(Boolean);
821
+ }
660
822
  function resolveCodeableConceptToken(value) {
661
823
  const coding = asArray(asRecord(value).coding)
662
824
  .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. */