gdc-common-utils-ts 2.9.14 → 2.9.15

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 (42) hide show
  1. package/dist/convert/convert-shared.js +1 -1
  2. package/dist/examples/shared.d.ts +2 -0
  3. package/dist/examples/shared.js +3 -1
  4. package/dist/utils/allergy-intolerance-entry-editor.d.ts +7 -2
  5. package/dist/utils/allergy-intolerance-entry-editor.js +7 -4
  6. package/dist/utils/bundle-entry-editor.d.ts +12 -0
  7. package/dist/utils/bundle-entry-editor.js +57 -0
  8. package/dist/utils/care-plan-entry-editor.d.ts +21 -0
  9. package/dist/utils/care-plan-entry-editor.js +20 -3
  10. package/dist/utils/clinical-impression-entry-editor.d.ts +7 -0
  11. package/dist/utils/clinical-impression-entry-editor.js +6 -0
  12. package/dist/utils/condition-entry-editor.d.ts +17 -0
  13. package/dist/utils/condition-entry-editor.js +24 -6
  14. package/dist/utils/coverage-entry-editor.d.ts +12 -0
  15. package/dist/utils/coverage-entry-editor.js +14 -6
  16. package/dist/utils/device-entry-editor.d.ts +6 -0
  17. package/dist/utils/device-entry-editor.js +7 -3
  18. package/dist/utils/device-use-statement-entry-editor.d.ts +5 -0
  19. package/dist/utils/device-use-statement-entry-editor.js +6 -3
  20. package/dist/utils/diagnostic-report-entry-editor.d.ts +11 -0
  21. package/dist/utils/diagnostic-report-entry-editor.js +15 -8
  22. package/dist/utils/document-reference-entry-editor.d.ts +12 -0
  23. package/dist/utils/document-reference-entry-editor.js +14 -6
  24. package/dist/utils/encounter-entry-editor.d.ts +17 -0
  25. package/dist/utils/encounter-entry-editor.js +20 -9
  26. package/dist/utils/flag-entry-editor.d.ts +13 -2
  27. package/dist/utils/flag-entry-editor.js +14 -7
  28. package/dist/utils/immunization-entry-editor.d.ts +44 -2
  29. package/dist/utils/immunization-entry-editor.js +57 -17
  30. package/dist/utils/medication-statement-entry-editor.d.ts +29 -6
  31. package/dist/utils/medication-statement-entry-editor.js +28 -12
  32. package/dist/utils/observation-component-entry-editor.d.ts +17 -0
  33. package/dist/utils/observation-component-entry-editor.js +42 -15
  34. package/dist/utils/observation-entry-editor.d.ts +8 -0
  35. package/dist/utils/observation-entry-editor.js +7 -0
  36. package/dist/utils/procedure-entry-editor.d.ts +22 -4
  37. package/dist/utils/procedure-entry-editor.js +21 -8
  38. package/dist/utils/related-person-entry-editor.d.ts +6 -0
  39. package/dist/utils/related-person-entry-editor.js +7 -2
  40. package/dist/utils/vital-sign-entry-editor.d.ts +6 -0
  41. package/dist/utils/vital-sign-entry-editor.js +10 -5
  42. package/package.json +1 -1
@@ -9,7 +9,7 @@ export function codingFromValue(value) {
9
9
  const [system, code] = value.split('|');
10
10
  if (!code)
11
11
  return [{ code: system }];
12
- return [{ system, code }];
12
+ return system ? [{ system, code }] : [{ code }];
13
13
  }
14
14
  export function codingToValue(coding) {
15
15
  if (!coding?.code)
@@ -449,6 +449,8 @@ export declare const EXAMPLE_MEDICATION_PARACETAMOL_NOTE: "Take every 8 hours as
449
449
  export declare const EXAMPLE_IMMUNIZATION_IDENTIFIER: "urn:uuid:immunization-example-001";
450
450
  export declare const EXAMPLE_IMMUNIZATION_STATUS_COMPLETED: "completed";
451
451
  export declare const EXAMPLE_IMMUNIZATION_DATE: "2026-06-10T09:30:00Z";
452
+ export declare const EXAMPLE_IMMUNIZATION_VACCINE_CODE_SYSTEM: "http://hl7.org/fhir/sid/cvx";
453
+ export declare const EXAMPLE_IMMUNIZATION_VACCINE_CODE_VALUE: "207";
452
454
  export declare const EXAMPLE_IMMUNIZATION_VACCINE_CODE: "http://hl7.org/fhir/sid/cvx|207";
453
455
  export declare const EXAMPLE_IMMUNIZATION_LOCATION_REFERENCE: "Location/location-example-001";
454
456
  export declare const EXAMPLE_IMMUNIZATION_MANUFACTURER_REFERENCE: "Organization/manufacturer-example-001";
@@ -521,7 +521,9 @@ export const EXAMPLE_MEDICATION_PARACETAMOL_NOTE = 'Take every 8 hours as needed
521
521
  export const EXAMPLE_IMMUNIZATION_IDENTIFIER = 'urn:uuid:immunization-example-001';
522
522
  export const EXAMPLE_IMMUNIZATION_STATUS_COMPLETED = 'completed';
523
523
  export const EXAMPLE_IMMUNIZATION_DATE = '2026-06-10T09:30:00Z';
524
- export const EXAMPLE_IMMUNIZATION_VACCINE_CODE = 'http://hl7.org/fhir/sid/cvx|207';
524
+ export const EXAMPLE_IMMUNIZATION_VACCINE_CODE_SYSTEM = 'http://hl7.org/fhir/sid/cvx';
525
+ export const EXAMPLE_IMMUNIZATION_VACCINE_CODE_VALUE = '207';
526
+ export const EXAMPLE_IMMUNIZATION_VACCINE_CODE = `${EXAMPLE_IMMUNIZATION_VACCINE_CODE_SYSTEM}|${EXAMPLE_IMMUNIZATION_VACCINE_CODE_VALUE}`;
525
527
  export const EXAMPLE_IMMUNIZATION_LOCATION_REFERENCE = 'Location/location-example-001';
526
528
  export const EXAMPLE_IMMUNIZATION_MANUFACTURER_REFERENCE = 'Organization/manufacturer-example-001';
527
529
  export const EXAMPLE_IMMUNIZATION_LOT_NUMBER = 'LOT-2026-001';
@@ -16,10 +16,15 @@ export declare class AllergyIntoleranceEntryEditor extends ClinicalResourceEntry
16
16
  setSubject(subject?: string | null): this;
17
17
  /** Reads the subject/patient reference for the allergy entry. */
18
18
  getSubject(): string | undefined;
19
- /** Writes the coded allergy substance. */
19
+ /** Writes the allergy code from `code`, `system|code`, or separate `system, code` arguments. */
20
20
  setCode(code?: string | null): this;
21
- /** Reads the coded allergy substance. */
21
+ setCode(codeSystem: string, codeValue: string): this;
22
+ /** Reads only the allergy code value. */
22
23
  getCode(): string | undefined;
24
+ setCodeSystem(system?: string | null): this;
25
+ getCodeSystem(): string | undefined;
26
+ setSystemAndCode(system?: string | null, code?: string | null): this;
27
+ getSystemAndCode(): string | undefined;
23
28
  /** Writes the local-language allergy name projected to FHIR `code.text`. */
24
29
  setCodeTextLocal(text?: string | null): this;
25
30
  /** Reads the local-language allergy name. */
@@ -19,10 +19,13 @@ export class AllergyIntoleranceEntryEditor extends ClinicalResourceEntryEditor {
19
19
  setSubject(subject) { return this.setSubjectClaims(AllergyIntoleranceClaim.Subject, AllergyIntoleranceClaim.Patient, subject); }
20
20
  /** Reads the subject/patient reference for the allergy entry. */
21
21
  getSubject() { return this.getSubjectClaims(AllergyIntoleranceClaim.Subject, AllergyIntoleranceClaim.Patient); }
22
- /** Writes the coded allergy substance. */
23
- setCode(code) { return this.setScalarClaim(AllergyIntoleranceClaim.Code, code); }
24
- /** Reads the coded allergy substance. */
25
- getCode() { return this.getScalarClaim(AllergyIntoleranceClaim.Code); }
22
+ setCode(codeOrSystem, codeValue) { return this.setCodingTokenCode(AllergyIntoleranceClaim.Code, codeOrSystem, codeValue); }
23
+ /** Reads only the allergy code value. */
24
+ getCode() { return this.getCodingTokenCode(AllergyIntoleranceClaim.Code); }
25
+ setCodeSystem(system) { return this.setCodingTokenSystem(AllergyIntoleranceClaim.Code, system); }
26
+ getCodeSystem() { return this.getCodingTokenSystem(AllergyIntoleranceClaim.Code); }
27
+ setSystemAndCode(system, code) { return this.setCodingTokenSystemAndCode(AllergyIntoleranceClaim.Code, system, code); }
28
+ getSystemAndCode() { return this.getCodingTokenSystemAndCode(AllergyIntoleranceClaim.Code); }
26
29
  /** Writes the local-language allergy name projected to FHIR `code.text`. */
27
30
  setCodeTextLocal(text) { return this.setScalarClaim(AllergyIntoleranceClaim.CodeText, text); }
28
31
  /** Reads the local-language allergy name. */
@@ -24,6 +24,18 @@ export declare class BundleEntryEditor {
24
24
  protected readonly bundleEditor: BundleEditor;
25
25
  protected readonly entryIndex: number;
26
26
  constructor(bundleEditor: BundleEditor, entryIndex: number);
27
+ /** Writes `code`, `system|code`, or separate `system, code` into one canonical token claim. */
28
+ protected setCodingTokenCode(claimKey: string, codeOrSystem?: string | null, codeValue?: string | null): this;
29
+ /** Returns only the code portion of one FHIR token claim. */
30
+ protected getCodingTokenCode(claimKey: string): string | undefined;
31
+ /** Replaces only the system portion, preserving the current code value. */
32
+ protected setCodingTokenSystem(claimKey: string, system?: string | null): this;
33
+ /** Returns only the system portion of one FHIR token claim. */
34
+ protected getCodingTokenSystem(claimKey: string): string | undefined;
35
+ /** Writes separate system and code values as one canonical `system|code` token. */
36
+ protected setCodingTokenSystemAndCode(claimKey: string, system?: string | null, code?: string | null): this;
37
+ /** Returns one canonical `system|code` token, including the separator for legacy bare codes. */
38
+ protected getCodingTokenSystemAndCode(claimKey: string): string | undefined;
27
39
  /** Stages a FHIR create request for only this batch entry. */
28
40
  create(): this;
29
41
  /** Stages a FHIR update request for only this batch entry. */
@@ -18,6 +18,63 @@ export class BundleEntryEditor {
18
18
  this.bundleEditor = bundleEditor;
19
19
  this.entryIndex = entryIndex;
20
20
  }
21
+ /** Writes `code`, `system|code`, or separate `system, code` into one canonical token claim. */
22
+ setCodingTokenCode(claimKey, codeOrSystem, codeValue) {
23
+ if (codeOrSystem === undefined || codeOrSystem === null) {
24
+ this.removeClaim(claimKey);
25
+ return this;
26
+ }
27
+ if (codeValue !== undefined && codeValue !== null) {
28
+ return this.setCodingTokenSystemAndCode(claimKey, codeOrSystem, codeValue);
29
+ }
30
+ const incoming = String(codeOrSystem).trim();
31
+ if (!incoming) {
32
+ this.removeClaim(claimKey);
33
+ return this;
34
+ }
35
+ const separator = incoming.indexOf('|');
36
+ if (separator >= 0) {
37
+ return this.setCodingTokenSystemAndCode(claimKey, incoming.slice(0, separator), incoming.slice(separator + 1));
38
+ }
39
+ return this.setClaim(claimKey, `${this.getCodingTokenSystem(claimKey) || ''}|${incoming}`);
40
+ }
41
+ /** Returns only the code portion of one FHIR token claim. */
42
+ getCodingTokenCode(claimKey) {
43
+ const token = normalizeOptionalIdentifier(this.getClaim(claimKey));
44
+ if (!token)
45
+ return undefined;
46
+ const separator = token.indexOf('|');
47
+ return normalizeOptionalIdentifier(separator < 0 ? token : token.slice(separator + 1));
48
+ }
49
+ /** Replaces only the system portion, preserving the current code value. */
50
+ setCodingTokenSystem(claimKey, system) {
51
+ const normalizedSystem = normalizeOptionalIdentifier(system) || '';
52
+ return this.setClaim(claimKey, `${normalizedSystem}|${this.getCodingTokenCode(claimKey) || ''}`);
53
+ }
54
+ /** Returns only the system portion of one FHIR token claim. */
55
+ getCodingTokenSystem(claimKey) {
56
+ const token = normalizeOptionalIdentifier(this.getClaim(claimKey));
57
+ if (!token)
58
+ return undefined;
59
+ const separator = token.indexOf('|');
60
+ return separator < 0 ? undefined : normalizeOptionalIdentifier(token.slice(0, separator));
61
+ }
62
+ /** Writes separate system and code values as one canonical `system|code` token. */
63
+ setCodingTokenSystemAndCode(claimKey, system, code) {
64
+ const normalizedSystem = normalizeOptionalIdentifier(system) || '';
65
+ const normalizedCode = normalizeOptionalIdentifier(code) || '';
66
+ return this.setClaim(claimKey, `${normalizedSystem}|${normalizedCode}`);
67
+ }
68
+ /** Returns one canonical `system|code` token, including the separator for legacy bare codes. */
69
+ getCodingTokenSystemAndCode(claimKey) {
70
+ const token = normalizeOptionalIdentifier(this.getClaim(claimKey));
71
+ if (!token)
72
+ return undefined;
73
+ const separator = token.indexOf('|');
74
+ return separator < 0
75
+ ? `|${token}`
76
+ : `${token.slice(0, separator).trim()}|${token.slice(separator + 1).trim()}`;
77
+ }
21
78
  /** Stages a FHIR create request for only this batch entry. */
22
79
  create() {
23
80
  const entry = this.getMutableEntry();
@@ -26,8 +26,14 @@ export declare class CarePlanEntryEditor extends ClinicalResourceEntryEditor {
26
26
  getIntent(): string | undefined;
27
27
  /** Writes the care-plan category. */
28
28
  setCategory(value?: string | null): this;
29
+ setCategory(codeSystem: string, codeValue: string): this;
29
30
  /** Reads the care-plan category. */
30
31
  getCategory(): string | undefined;
32
+ getCategoryCode(): string | undefined;
33
+ setCategoryCodeSystem(system?: string | null): this;
34
+ getCategoryCodeSystem(): string | undefined;
35
+ setCategorySystemAndCode(system?: string | null, code?: string | null): this;
36
+ getCategorySystemAndCode(): string | undefined;
31
37
  /** Writes the linked encounter reference. */
32
38
  setEncounter(value?: string | null): this;
33
39
  /** Reads the linked encounter reference. */
@@ -40,4 +46,19 @@ export declare class CarePlanEntryEditor extends ClinicalResourceEntryEditor {
40
46
  setNote(value?: string | null): this;
41
47
  /** Reads the note text. */
42
48
  getNote(): string | undefined;
49
+ setActivityCode(value?: string | null): this;
50
+ setActivityCode(codeSystem: string, codeValue: string): this;
51
+ getActivityCode(): string | undefined;
52
+ setActivityCodeSystem(system?: string | null): this;
53
+ getActivityCodeSystem(): string | undefined;
54
+ setActivitySystemAndCode(system?: string | null, code?: string | null): this;
55
+ getActivitySystemAndCode(): string | undefined;
56
+ setActivityOutcome(value?: string | null): this;
57
+ setActivityOutcome(codeSystem: string, codeValue: string): this;
58
+ getActivityOutcome(): string | undefined;
59
+ getActivityOutcomeCode(): string | undefined;
60
+ setActivityOutcomeCodeSystem(system?: string | null): this;
61
+ getActivityOutcomeCodeSystem(): string | undefined;
62
+ setActivityOutcomeSystemAndCode(system?: string | null, code?: string | null): this;
63
+ getActivityOutcomeSystemAndCode(): string | undefined;
43
64
  }
@@ -27,10 +27,14 @@ export class CarePlanEntryEditor extends ClinicalResourceEntryEditor {
27
27
  setIntent(value) { return this.setScalarClaim(CarePlanClaim.Intent, value); }
28
28
  /** Reads the care-plan intent. */
29
29
  getIntent() { return this.getScalarClaim(CarePlanClaim.Intent); }
30
- /** Writes the care-plan category. */
31
- setCategory(value) { return this.setScalarClaim(CarePlanClaim.Category, value); }
30
+ setCategory(valueOrSystem, codeValue) { return this.setCodingTokenCode(CarePlanClaim.Category, valueOrSystem, codeValue); }
32
31
  /** Reads the care-plan category. */
33
- getCategory() { return this.getScalarClaim(CarePlanClaim.Category); }
32
+ getCategory() { return this.getCodingTokenSystemAndCode(CarePlanClaim.Category); }
33
+ getCategoryCode() { return this.getCodingTokenCode(CarePlanClaim.Category); }
34
+ setCategoryCodeSystem(system) { return this.setCodingTokenSystem(CarePlanClaim.Category, system); }
35
+ getCategoryCodeSystem() { return this.getCodingTokenSystem(CarePlanClaim.Category); }
36
+ setCategorySystemAndCode(system, code) { return this.setCodingTokenSystemAndCode(CarePlanClaim.Category, system, code); }
37
+ getCategorySystemAndCode() { return this.getCodingTokenSystemAndCode(CarePlanClaim.Category); }
34
38
  /** Writes the linked encounter reference. */
35
39
  setEncounter(value) { return this.setScalarClaim(CarePlanClaim.Encounter, value); }
36
40
  /** Reads the linked encounter reference. */
@@ -43,5 +47,18 @@ export class CarePlanEntryEditor extends ClinicalResourceEntryEditor {
43
47
  setNote(value) { return this.setScalarClaim(CarePlanClaim.Note, value); }
44
48
  /** Reads the note text. */
45
49
  getNote() { return this.getScalarClaim(CarePlanClaim.Note); }
50
+ setActivityCode(valueOrSystem, codeValue) { return this.setCodingTokenCode(CarePlanClaim.ActivityCode, valueOrSystem, codeValue); }
51
+ getActivityCode() { return this.getCodingTokenCode(CarePlanClaim.ActivityCode); }
52
+ setActivityCodeSystem(system) { return this.setCodingTokenSystem(CarePlanClaim.ActivityCode, system); }
53
+ getActivityCodeSystem() { return this.getCodingTokenSystem(CarePlanClaim.ActivityCode); }
54
+ setActivitySystemAndCode(system, code) { return this.setCodingTokenSystemAndCode(CarePlanClaim.ActivityCode, system, code); }
55
+ getActivitySystemAndCode() { return this.getCodingTokenSystemAndCode(CarePlanClaim.ActivityCode); }
56
+ setActivityOutcome(valueOrSystem, codeValue) { return this.setCodingTokenCode(CarePlanClaim.ActivityOutcome, valueOrSystem, codeValue); }
57
+ getActivityOutcome() { return this.getCodingTokenSystemAndCode(CarePlanClaim.ActivityOutcome); }
58
+ getActivityOutcomeCode() { return this.getCodingTokenCode(CarePlanClaim.ActivityOutcome); }
59
+ setActivityOutcomeCodeSystem(system) { return this.setCodingTokenSystem(CarePlanClaim.ActivityOutcome, system); }
60
+ getActivityOutcomeCodeSystem() { return this.getCodingTokenSystem(CarePlanClaim.ActivityOutcome); }
61
+ setActivityOutcomeSystemAndCode(system, code) { return this.setCodingTokenSystemAndCode(CarePlanClaim.ActivityOutcome, system, code); }
62
+ getActivityOutcomeSystemAndCode() { return this.getCodingTokenSystemAndCode(CarePlanClaim.ActivityOutcome); }
46
63
  }
47
64
  registerBundleEntryEditor(BundleEditableResourceTypes.carePlan, CarePlanEntryEditor);
@@ -40,4 +40,11 @@ export declare class ClinicalImpressionEntryEditor extends ClinicalResourceEntry
40
40
  setSummary(value?: string | null): this;
41
41
  /** Reads the summary text. */
42
42
  getSummary(): string | undefined;
43
+ setPrognosisCode(value?: string | null): this;
44
+ setPrognosisCode(codeSystem: string, codeValue: string): this;
45
+ getPrognosisCode(): string | undefined;
46
+ setPrognosisCodeSystem(system?: string | null): this;
47
+ getPrognosisCodeSystem(): string | undefined;
48
+ setPrognosisSystemAndCode(system?: string | null, code?: string | null): this;
49
+ getPrognosisSystemAndCode(): string | undefined;
43
50
  }
@@ -43,5 +43,11 @@ export class ClinicalImpressionEntryEditor extends ClinicalResourceEntryEditor {
43
43
  setSummary(value) { return this.setScalarClaim(ClinicalImpressionClaim.Summary, value); }
44
44
  /** Reads the summary text. */
45
45
  getSummary() { return this.getScalarClaim(ClinicalImpressionClaim.Summary); }
46
+ setPrognosisCode(valueOrSystem, codeValue) { return this.setCodingTokenCode(ClinicalImpressionClaim.PrognosisCode, valueOrSystem, codeValue); }
47
+ getPrognosisCode() { return this.getCodingTokenCode(ClinicalImpressionClaim.PrognosisCode); }
48
+ setPrognosisCodeSystem(system) { return this.setCodingTokenSystem(ClinicalImpressionClaim.PrognosisCode, system); }
49
+ getPrognosisCodeSystem() { return this.getCodingTokenSystem(ClinicalImpressionClaim.PrognosisCode); }
50
+ setPrognosisSystemAndCode(system, code) { return this.setCodingTokenSystemAndCode(ClinicalImpressionClaim.PrognosisCode, system, code); }
51
+ getPrognosisSystemAndCode() { return this.getCodingTokenSystemAndCode(ClinicalImpressionClaim.PrognosisCode); }
46
52
  }
47
53
  registerBundleEntryEditor(BundleEditableResourceTypes.clinicalImpression, ClinicalImpressionEntryEditor);
@@ -12,7 +12,12 @@ export declare class ConditionEntryEditor extends ClinicalResourceEntryEditor {
12
12
  setSubject(subject?: string | null): this;
13
13
  getSubject(): string | undefined;
14
14
  setCode(code?: string | null): this;
15
+ setCode(codeSystem: string, codeValue: string): this;
15
16
  getCode(): string | undefined;
17
+ setCodeSystem(system?: string | null): this;
18
+ getCodeSystem(): string | undefined;
19
+ setSystemAndCode(system?: string | null, code?: string | null): this;
20
+ getSystemAndCode(): string | undefined;
16
21
  /** Writes the local-language condition name projected to FHIR `code.text`. */
17
22
  setCodeTextLocal(text?: string | null): this;
18
23
  /** Reads the local-language condition name. */
@@ -26,9 +31,21 @@ export declare class ConditionEntryEditor extends ClinicalResourceEntryEditor {
26
31
  setVerificationStatus(status?: string | null): this;
27
32
  getVerificationStatus(): string | undefined;
28
33
  setCategory(category?: string | null): this;
34
+ setCategory(codeSystem: string, codeValue: string): this;
29
35
  getCategory(): string | undefined;
36
+ getCategoryCode(): string | undefined;
37
+ setCategoryCodeSystem(system?: string | null): this;
38
+ getCategoryCodeSystem(): string | undefined;
39
+ setCategorySystemAndCode(system?: string | null, code?: string | null): this;
40
+ getCategorySystemAndCode(): string | undefined;
30
41
  setSeverity(severity?: string | null): this;
42
+ setSeverity(codeSystem: string, codeValue: string): this;
31
43
  getSeverity(): string | undefined;
44
+ getSeverityCode(): string | undefined;
45
+ setSeverityCodeSystem(system?: string | null): this;
46
+ getSeverityCodeSystem(): string | undefined;
47
+ setSeveritySystemAndCode(system?: string | null, code?: string | null): this;
48
+ getSeveritySystemAndCode(): string | undefined;
32
49
  setOnsetDateTime(value?: string | null): this;
33
50
  getOnsetDateTime(): string | undefined;
34
51
  setRecorder(reference?: string | null): this;
@@ -14,8 +14,16 @@ export class ConditionEntryEditor extends ClinicalResourceEntryEditor {
14
14
  ensureIdentifier() { return this.ensureIdentifierValue(ConditionClaim.Identifier); }
15
15
  setSubject(subject) { return this.setSubjectClaims(ConditionClaim.Subject, ConditionClaim.Subject, subject); }
16
16
  getSubject() { return this.getSubjectClaims(ConditionClaim.Subject, ConditionClaim.Subject); }
17
- setCode(code) { return this.setScalarClaim(ConditionClaim.Code, code); }
18
- getCode() { return this.getScalarClaim(ConditionClaim.Code); }
17
+ setCode(codeOrSystem, codeValue) {
18
+ return this.setCodingTokenCode(ConditionClaim.Code, codeOrSystem, codeValue);
19
+ }
20
+ getCode() { return this.getCodingTokenCode(ConditionClaim.Code); }
21
+ setCodeSystem(system) { return this.setCodingTokenSystem(ConditionClaim.Code, system); }
22
+ getCodeSystem() { return this.getCodingTokenSystem(ConditionClaim.Code); }
23
+ setSystemAndCode(system, code) {
24
+ return this.setCodingTokenSystemAndCode(ConditionClaim.Code, system, code);
25
+ }
26
+ getSystemAndCode() { return this.getCodingTokenSystemAndCode(ConditionClaim.Code); }
19
27
  /** Writes the local-language condition name projected to FHIR `code.text`. */
20
28
  setCodeTextLocal(text) { return this.setScalarClaim(ConditionClaim.CodeText, text); }
21
29
  /** Reads the local-language condition name. */
@@ -28,10 +36,20 @@ export class ConditionEntryEditor extends ClinicalResourceEntryEditor {
28
36
  getClinicalStatus() { return this.getScalarClaim(ConditionClaim.ClinicalStatus); }
29
37
  setVerificationStatus(status) { return this.setScalarClaim(ConditionClaim.VerificationStatus, status); }
30
38
  getVerificationStatus() { return this.getScalarClaim(ConditionClaim.VerificationStatus); }
31
- setCategory(category) { return this.setScalarClaim(ConditionClaim.Category, category); }
32
- getCategory() { return this.getScalarClaim(ConditionClaim.Category); }
33
- setSeverity(severity) { return this.setScalarClaim(ConditionClaim.Severity, severity); }
34
- getSeverity() { return this.getScalarClaim(ConditionClaim.Severity); }
39
+ setCategory(categoryOrSystem, codeValue) { return this.setCodingTokenCode(ConditionClaim.Category, categoryOrSystem, codeValue); }
40
+ getCategory() { return this.getCodingTokenSystemAndCode(ConditionClaim.Category); }
41
+ getCategoryCode() { return this.getCodingTokenCode(ConditionClaim.Category); }
42
+ setCategoryCodeSystem(system) { return this.setCodingTokenSystem(ConditionClaim.Category, system); }
43
+ getCategoryCodeSystem() { return this.getCodingTokenSystem(ConditionClaim.Category); }
44
+ setCategorySystemAndCode(system, code) { return this.setCodingTokenSystemAndCode(ConditionClaim.Category, system, code); }
45
+ getCategorySystemAndCode() { return this.getCodingTokenSystemAndCode(ConditionClaim.Category); }
46
+ setSeverity(severityOrSystem, codeValue) { return this.setCodingTokenCode(ConditionClaim.Severity, severityOrSystem, codeValue); }
47
+ getSeverity() { return this.getCodingTokenSystemAndCode(ConditionClaim.Severity); }
48
+ getSeverityCode() { return this.getCodingTokenCode(ConditionClaim.Severity); }
49
+ setSeverityCodeSystem(system) { return this.setCodingTokenSystem(ConditionClaim.Severity, system); }
50
+ getSeverityCodeSystem() { return this.getCodingTokenSystem(ConditionClaim.Severity); }
51
+ setSeveritySystemAndCode(system, code) { return this.setCodingTokenSystemAndCode(ConditionClaim.Severity, system, code); }
52
+ getSeveritySystemAndCode() { return this.getCodingTokenSystemAndCode(ConditionClaim.Severity); }
35
53
  setOnsetDateTime(value) { return this.setScalarClaim(ConditionClaim.OnsetDateTime, value); }
36
54
  getOnsetDateTime() { return this.getScalarClaim(ConditionClaim.OnsetDateTime); }
37
55
  setRecorder(reference) { return this.setScalarClaim(ConditionClaim.Recorder, reference); }
@@ -18,8 +18,14 @@ export declare class CoverageEntryEditor extends ClinicalResourceEntryEditor {
18
18
  getStatus(): string | undefined;
19
19
  /** Writes the coverage type. */
20
20
  setType(value?: string | null): this;
21
+ setType(codeSystem: string, codeValue: string): this;
21
22
  /** Reads the coverage type. */
22
23
  getType(): string | undefined;
24
+ getTypeCode(): string | undefined;
25
+ setTypeCodeSystem(system?: string | null): this;
26
+ getTypeCodeSystem(): string | undefined;
27
+ setTypeSystemAndCode(system?: string | null, code?: string | null): this;
28
+ getTypeSystemAndCode(): string | undefined;
23
29
  /** Writes the policy-holder reference. */
24
30
  setPolicyHolder(value?: string | null): this;
25
31
  /** Reads the policy-holder reference. */
@@ -34,8 +40,14 @@ export declare class CoverageEntryEditor extends ClinicalResourceEntryEditor {
34
40
  getBeneficiary(): string | undefined;
35
41
  /** Writes the subscriber relationship. */
36
42
  setRelationship(value?: string | null): this;
43
+ setRelationship(codeSystem: string, codeValue: string): this;
37
44
  /** Reads the subscriber relationship. */
38
45
  getRelationship(): string | undefined;
46
+ getRelationshipCode(): string | undefined;
47
+ setRelationshipCodeSystem(system?: string | null): this;
48
+ getRelationshipCodeSystem(): string | undefined;
49
+ setRelationshipSystemAndCode(system?: string | null, code?: string | null): this;
50
+ getRelationshipSystemAndCode(): string | undefined;
39
51
  /** Writes the coverage period start. */
40
52
  setPeriodStart(value?: string | null): this;
41
53
  /** Reads the coverage period start. */
@@ -19,10 +19,14 @@ export class CoverageEntryEditor extends ClinicalResourceEntryEditor {
19
19
  setStatus(value) { return this.setScalarClaim(CoverageClaim.Status, value); }
20
20
  /** Reads the coverage status. */
21
21
  getStatus() { return this.getScalarClaim(CoverageClaim.Status); }
22
- /** Writes the coverage type. */
23
- setType(value) { return this.setScalarClaim(CoverageClaim.Type, value); }
22
+ setType(valueOrSystem, codeValue) { return this.setCodingTokenCode(CoverageClaim.Type, valueOrSystem, codeValue); }
24
23
  /** Reads the coverage type. */
25
- getType() { return this.getScalarClaim(CoverageClaim.Type); }
24
+ getType() { return this.getCodingTokenSystemAndCode(CoverageClaim.Type); }
25
+ getTypeCode() { return this.getCodingTokenCode(CoverageClaim.Type); }
26
+ setTypeCodeSystem(system) { return this.setCodingTokenSystem(CoverageClaim.Type, system); }
27
+ getTypeCodeSystem() { return this.getCodingTokenSystem(CoverageClaim.Type); }
28
+ setTypeSystemAndCode(system, code) { return this.setCodingTokenSystemAndCode(CoverageClaim.Type, system, code); }
29
+ getTypeSystemAndCode() { return this.getCodingTokenSystemAndCode(CoverageClaim.Type); }
26
30
  /** Writes the policy-holder reference. */
27
31
  setPolicyHolder(value) { return this.setScalarClaim(CoverageClaim.PolicyHolder, value); }
28
32
  /** Reads the policy-holder reference. */
@@ -35,10 +39,14 @@ export class CoverageEntryEditor extends ClinicalResourceEntryEditor {
35
39
  setBeneficiary(value) { return this.setScalarClaim(CoverageClaim.Beneficiary, value); }
36
40
  /** Reads the beneficiary reference. */
37
41
  getBeneficiary() { return this.getScalarClaim(CoverageClaim.Beneficiary); }
38
- /** Writes the subscriber relationship. */
39
- setRelationship(value) { return this.setScalarClaim(CoverageClaim.Relationship, value); }
42
+ setRelationship(valueOrSystem, codeValue) { return this.setCodingTokenCode(CoverageClaim.Relationship, valueOrSystem, codeValue); }
40
43
  /** Reads the subscriber relationship. */
41
- getRelationship() { return this.getScalarClaim(CoverageClaim.Relationship); }
44
+ getRelationship() { return this.getCodingTokenSystemAndCode(CoverageClaim.Relationship); }
45
+ getRelationshipCode() { return this.getCodingTokenCode(CoverageClaim.Relationship); }
46
+ setRelationshipCodeSystem(system) { return this.setCodingTokenSystem(CoverageClaim.Relationship, system); }
47
+ getRelationshipCodeSystem() { return this.getCodingTokenSystem(CoverageClaim.Relationship); }
48
+ setRelationshipSystemAndCode(system, code) { return this.setCodingTokenSystemAndCode(CoverageClaim.Relationship, system, code); }
49
+ getRelationshipSystemAndCode() { return this.getCodingTokenSystemAndCode(CoverageClaim.Relationship); }
42
50
  /** Writes the coverage period start. */
43
51
  setPeriodStart(value) { return this.setScalarClaim(CoverageClaim.PeriodStart, value); }
44
52
  /** Reads the coverage period start. */
@@ -22,8 +22,14 @@ export declare class DeviceEntryEditor extends ClinicalResourceEntryEditor {
22
22
  getStatus(): string | undefined;
23
23
  /** Writes the device type. */
24
24
  setType(value?: string | null): this;
25
+ setType(codeSystem: string, codeValue: string): this;
25
26
  /** Reads the device type. */
26
27
  getType(): string | undefined;
28
+ getTypeCode(): string | undefined;
29
+ setTypeCodeSystem(system?: string | null): this;
30
+ getTypeCodeSystem(): string | undefined;
31
+ setTypeSystemAndCode(system?: string | null, code?: string | null): this;
32
+ getTypeSystemAndCode(): string | undefined;
27
33
  /** Writes the manufacturer reference. */
28
34
  setManufacturer(value?: string | null): this;
29
35
  /** Reads the manufacturer reference. */
@@ -23,10 +23,14 @@ export class DeviceEntryEditor extends ClinicalResourceEntryEditor {
23
23
  setStatus(value) { return this.setScalarClaim(DeviceClaim.Status, value); }
24
24
  /** Reads the device status. */
25
25
  getStatus() { return this.getScalarClaim(DeviceClaim.Status); }
26
- /** Writes the device type. */
27
- setType(value) { return this.setScalarClaim(DeviceClaim.Type, value); }
26
+ setType(valueOrSystem, codeValue) { return this.setCodingTokenCode(DeviceClaim.Type, valueOrSystem, codeValue); }
28
27
  /** Reads the device type. */
29
- getType() { return this.getScalarClaim(DeviceClaim.Type); }
28
+ getType() { return this.getCodingTokenSystemAndCode(DeviceClaim.Type); }
29
+ getTypeCode() { return this.getCodingTokenCode(DeviceClaim.Type); }
30
+ setTypeCodeSystem(system) { return this.setCodingTokenSystem(DeviceClaim.Type, system); }
31
+ getTypeCodeSystem() { return this.getCodingTokenSystem(DeviceClaim.Type); }
32
+ setTypeSystemAndCode(system, code) { return this.setCodingTokenSystemAndCode(DeviceClaim.Type, system, code); }
33
+ getTypeSystemAndCode() { return this.getCodingTokenSystemAndCode(DeviceClaim.Type); }
30
34
  /** Writes the manufacturer reference. */
31
35
  setManufacturer(value) { return this.setScalarClaim(DeviceClaim.Manufacturer, value); }
32
36
  /** Reads the manufacturer reference. */
@@ -34,8 +34,13 @@ export declare class DeviceUseStatementEntryEditor extends ClinicalResourceEntry
34
34
  getTimingDateTime(): string | undefined;
35
35
  /** Writes the reason code. */
36
36
  setReasonCode(value?: string | null): this;
37
+ setReasonCode(codeSystem: string, codeValue: string): this;
37
38
  /** Reads the reason code. */
38
39
  getReasonCode(): string | undefined;
40
+ setReasonCodeSystem(system?: string | null): this;
41
+ getReasonCodeSystem(): string | undefined;
42
+ setReasonSystemAndCode(system?: string | null, code?: string | null): this;
43
+ getReasonSystemAndCode(): string | undefined;
39
44
  /** Writes the source reference. */
40
45
  setSource(value?: string | null): this;
41
46
  /** Reads the source reference. */
@@ -35,10 +35,13 @@ export class DeviceUseStatementEntryEditor extends ClinicalResourceEntryEditor {
35
35
  setTimingDateTime(value) { return this.setScalarClaim(DeviceUseStatementClaim.TimingDateTime, value); }
36
36
  /** Reads the timing date/time. */
37
37
  getTimingDateTime() { return this.getScalarClaim(DeviceUseStatementClaim.TimingDateTime); }
38
- /** Writes the reason code. */
39
- setReasonCode(value) { return this.setScalarClaim(DeviceUseStatementClaim.ReasonCode, value); }
38
+ setReasonCode(valueOrSystem, codeValue) { return this.setCodingTokenCode(DeviceUseStatementClaim.ReasonCode, valueOrSystem, codeValue); }
40
39
  /** Reads the reason code. */
41
- getReasonCode() { return this.getScalarClaim(DeviceUseStatementClaim.ReasonCode); }
40
+ getReasonCode() { return this.getCodingTokenCode(DeviceUseStatementClaim.ReasonCode); }
41
+ setReasonCodeSystem(system) { return this.setCodingTokenSystem(DeviceUseStatementClaim.ReasonCode, system); }
42
+ getReasonCodeSystem() { return this.getCodingTokenSystem(DeviceUseStatementClaim.ReasonCode); }
43
+ setReasonSystemAndCode(system, code) { return this.setCodingTokenSystemAndCode(DeviceUseStatementClaim.ReasonCode, system, code); }
44
+ getReasonSystemAndCode() { return this.getCodingTokenSystemAndCode(DeviceUseStatementClaim.ReasonCode); }
42
45
  /** Writes the source reference. */
43
46
  setSource(value) { return this.setScalarClaim(DeviceUseStatementClaim.Source, value); }
44
47
  /** Reads the source reference. */
@@ -33,12 +33,23 @@ export declare class DiagnosticReportEntryEditor extends ClinicalResourceEntryEd
33
33
  getDate(): string | undefined;
34
34
  /** Sets the report category. */
35
35
  setCategory(category?: string | null): this;
36
+ setCategory(codeSystem: string, codeValue: string): this;
36
37
  /** Returns the report category. */
37
38
  getCategory(): string | undefined;
39
+ getCategoryCode(): string | undefined;
40
+ setCategoryCodeSystem(system?: string | null): this;
41
+ getCategoryCodeSystem(): string | undefined;
42
+ setCategorySystemAndCode(system?: string | null, code?: string | null): this;
43
+ getCategorySystemAndCode(): string | undefined;
38
44
  /** Sets the main report code. */
39
45
  setCode(code?: string | null): this;
46
+ setCode(codeSystem: string, codeValue: string): this;
40
47
  /** Returns the main report code. */
41
48
  getCode(): string | undefined;
49
+ setCodeSystem(system?: string | null): this;
50
+ getCodeSystem(): string | undefined;
51
+ setSystemAndCode(system?: string | null, code?: string | null): this;
52
+ getSystemAndCode(): string | undefined;
42
53
  /** Sets the local-language report name projected to FHIR `code.text`. */
43
54
  setCodeTextLocal(text?: string | null): this;
44
55
  /** Returns the local-language report name. */
@@ -52,22 +52,29 @@ export class DiagnosticReportEntryEditor extends ClinicalResourceEntryEditor {
52
52
  getDate() {
53
53
  return this.getScalarClaim(DiagnosticReportClaim.Date);
54
54
  }
55
- /** Sets the report category. */
56
- setCategory(category) {
57
- return this.setScalarClaim(DiagnosticReportClaim.Category, category);
55
+ setCategory(categoryOrSystem, codeValue) {
56
+ return this.setCodingTokenCode(DiagnosticReportClaim.Category, categoryOrSystem, codeValue);
58
57
  }
59
58
  /** Returns the report category. */
60
59
  getCategory() {
61
- return this.getScalarClaim(DiagnosticReportClaim.Category);
60
+ return this.getCodingTokenSystemAndCode(DiagnosticReportClaim.Category);
62
61
  }
63
- /** Sets the main report code. */
64
- setCode(code) {
65
- return this.setScalarClaim(DiagnosticReportClaim.Code, code);
62
+ getCategoryCode() { return this.getCodingTokenCode(DiagnosticReportClaim.Category); }
63
+ setCategoryCodeSystem(system) { return this.setCodingTokenSystem(DiagnosticReportClaim.Category, system); }
64
+ getCategoryCodeSystem() { return this.getCodingTokenSystem(DiagnosticReportClaim.Category); }
65
+ setCategorySystemAndCode(system, code) { return this.setCodingTokenSystemAndCode(DiagnosticReportClaim.Category, system, code); }
66
+ getCategorySystemAndCode() { return this.getCodingTokenSystemAndCode(DiagnosticReportClaim.Category); }
67
+ setCode(codeOrSystem, codeValue) {
68
+ return this.setCodingTokenCode(DiagnosticReportClaim.Code, codeOrSystem, codeValue);
66
69
  }
67
70
  /** Returns the main report code. */
68
71
  getCode() {
69
- return this.getScalarClaim(DiagnosticReportClaim.Code);
72
+ return this.getCodingTokenCode(DiagnosticReportClaim.Code);
70
73
  }
74
+ setCodeSystem(system) { return this.setCodingTokenSystem(DiagnosticReportClaim.Code, system); }
75
+ getCodeSystem() { return this.getCodingTokenSystem(DiagnosticReportClaim.Code); }
76
+ setSystemAndCode(system, code) { return this.setCodingTokenSystemAndCode(DiagnosticReportClaim.Code, system, code); }
77
+ getSystemAndCode() { return this.getCodingTokenSystemAndCode(DiagnosticReportClaim.Code); }
71
78
  /** Sets the local-language report name projected to FHIR `code.text`. */
72
79
  setCodeTextLocal(text) {
73
80
  return this.setScalarClaim(DiagnosticReportClaim.CodeText, text);
@@ -25,12 +25,24 @@ export declare class DocumentReferenceEntryEditor extends ClinicalResourceEntryE
25
25
  getSubject(): string | undefined;
26
26
  /** Sets the coded document type. */
27
27
  setType(value?: string | null): this;
28
+ setType(codeSystem: string, codeValue: string): this;
28
29
  /** Returns the coded document type. */
29
30
  getType(): string | undefined;
31
+ getTypeCode(): string | undefined;
32
+ setTypeCodeSystem(system?: string | null): this;
33
+ getTypeCodeSystem(): string | undefined;
34
+ setTypeSystemAndCode(system?: string | null, code?: string | null): this;
35
+ getTypeSystemAndCode(): string | undefined;
30
36
  /** Sets the document category. */
31
37
  setCategory(value?: string | null): this;
38
+ setCategory(codeSystem: string, codeValue: string): this;
32
39
  /** Returns the document category. */
33
40
  getCategory(): string | undefined;
41
+ getCategoryCode(): string | undefined;
42
+ setCategoryCodeSystem(system?: string | null): this;
43
+ getCategoryCodeSystem(): string | undefined;
44
+ setCategorySystemAndCode(system?: string | null, code?: string | null): this;
45
+ getCategorySystemAndCode(): string | undefined;
34
46
  /** Sets the MIME type of the attached payload, such as PDF or image content. */
35
47
  setContentType(value?: string | null): this;
36
48
  /** Returns the MIME type of the attached payload. */
@@ -26,14 +26,22 @@ export class DocumentReferenceEntryEditor extends ClinicalResourceEntryEditor {
26
26
  setSubject(subject) { return this.setScalarClaim(DocumentReferenceClaim.Subject, subject); }
27
27
  /** Returns the subject reference for the attached document. */
28
28
  getSubject() { return this.getScalarClaim(DocumentReferenceClaim.Subject); }
29
- /** Sets the coded document type. */
30
- setType(value) { return this.setScalarClaim(DocumentReferenceClaim.Type, value); }
29
+ setType(valueOrSystem, codeValue) { return this.setCodingTokenCode(DocumentReferenceClaim.Type, valueOrSystem, codeValue); }
31
30
  /** Returns the coded document type. */
32
- getType() { return this.getScalarClaim(DocumentReferenceClaim.Type); }
33
- /** Sets the document category. */
34
- setCategory(value) { return this.setScalarClaim(DocumentReferenceClaim.Category, value); }
31
+ getType() { return this.getCodingTokenSystemAndCode(DocumentReferenceClaim.Type); }
32
+ getTypeCode() { return this.getCodingTokenCode(DocumentReferenceClaim.Type); }
33
+ setTypeCodeSystem(system) { return this.setCodingTokenSystem(DocumentReferenceClaim.Type, system); }
34
+ getTypeCodeSystem() { return this.getCodingTokenSystem(DocumentReferenceClaim.Type); }
35
+ setTypeSystemAndCode(system, code) { return this.setCodingTokenSystemAndCode(DocumentReferenceClaim.Type, system, code); }
36
+ getTypeSystemAndCode() { return this.getCodingTokenSystemAndCode(DocumentReferenceClaim.Type); }
37
+ setCategory(valueOrSystem, codeValue) { return this.setCodingTokenCode(DocumentReferenceClaim.Category, valueOrSystem, codeValue); }
35
38
  /** Returns the document category. */
36
- getCategory() { return this.getScalarClaim(DocumentReferenceClaim.Category); }
39
+ getCategory() { return this.getCodingTokenSystemAndCode(DocumentReferenceClaim.Category); }
40
+ getCategoryCode() { return this.getCodingTokenCode(DocumentReferenceClaim.Category); }
41
+ setCategoryCodeSystem(system) { return this.setCodingTokenSystem(DocumentReferenceClaim.Category, system); }
42
+ getCategoryCodeSystem() { return this.getCodingTokenSystem(DocumentReferenceClaim.Category); }
43
+ setCategorySystemAndCode(system, code) { return this.setCodingTokenSystemAndCode(DocumentReferenceClaim.Category, system, code); }
44
+ getCategorySystemAndCode() { return this.getCodingTokenSystemAndCode(DocumentReferenceClaim.Category); }
37
45
  /** Sets the MIME type of the attached payload, such as PDF or image content. */
38
46
  setContentType(value) { return this.setScalarClaim(DocumentReferenceClaim.ContentType, value); }
39
47
  /** Returns the MIME type of the attached payload. */