-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* remove `@types/fhir` dependency * update readme * remove `@types/fhir` usages * tidy up utils * type: composition * finalize types * Revert "update readme" This reverts commit 8d37c62. * add changeset
- Loading branch information
1 parent
57dc9ad
commit be4257a
Showing
7 changed files
with
110 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@ssecd/jkn": patch | ||
--- | ||
|
||
Fix Rekam Medis bundle types |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,7 +45,6 @@ | |
}, | ||
"devDependencies": { | ||
"@changesets/cli": "^2.27.1", | ||
"@types/fhir": "^0.0.38", | ||
"@types/node": "^20.10.5", | ||
"@typescript-eslint/eslint-plugin": "^6.15.0", | ||
"@typescript-eslint/parser": "^6.15.0", | ||
|
@@ -59,6 +58,9 @@ | |
"dependencies": { | ||
"lz-string": "^1.5.0" | ||
}, | ||
"peerDependencies": { | ||
"@types/fhir": "^0.0.40" | ||
}, | ||
"packageManager": "[email protected]", | ||
"engines": { | ||
"pnpm": "^8.0.0" | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,99 @@ | ||
export interface Composition extends fhir4.Composition {} | ||
/* | ||
* Unfortunately, we are unable to fully utilize `@types/fhir` here because BPJS | ||
* TrustMark does not seem to be adhering to the standard FHIR implementation. | ||
*/ | ||
|
||
export interface Composition extends Omit<fhir4.Composition, 'section'> { | ||
section: { | ||
[key: string]: fhir4.CompositionSection; | ||
}; | ||
} | ||
|
||
export interface Patient extends fhir4.Patient {} | ||
|
||
export interface Encounter extends fhir4.Encounter { | ||
subject?: fhir4.Encounter['subject'] & { noSep: string }; | ||
subject: fhir4.Reference & { noSep: string }; | ||
incomingReferral: { identifier: fhir4.Identifier[] }[]; | ||
reason: fhir4.CodeableConcept[]; | ||
diagnosis?: | ||
| (fhir4.EncounterDiagnosis & { | ||
condition: fhir4.Reference & { role: fhir4.CodeableConcept; rank: number }; | ||
})[] | ||
| undefined; | ||
hospitalization: | ||
| (fhir4.EncounterHospitalization & { | ||
dischargeDisposition?: fhir4.CodeableConcept[] | undefined; | ||
}) | ||
| undefined; | ||
} | ||
|
||
export interface MedicationRequest extends fhir4.MedicationRequest {} | ||
export interface MedicationRequest | ||
extends Omit< | ||
fhir4.MedicationRequest, | ||
'identifier' | 'intent' | 'dosageInstruction' | 'requester' | ||
> { | ||
identifier?: fhir4.Identifier; | ||
intent: fhir4.MedicationRequest['intent'] | 'final'; | ||
dosageInstruction?: (Omit<fhir4.Dosage, 'timing'> & { | ||
doseQuantity: Omit<fhir4.Quantity, 'value'> & { value: string }; | ||
timing: { | ||
repeat: { frequency: string; periodUnit: string; period: number }; | ||
}; | ||
})[]; | ||
requester: { | ||
agent: fhir4.Reference; | ||
onBehalfOf: fhir4.Reference; | ||
}; | ||
} | ||
|
||
export interface Practitioner extends fhir4.Practitioner {} | ||
|
||
export interface Organization extends fhir4.Organization {} | ||
|
||
export interface Condition extends fhir4.Condition {} | ||
export interface Condition extends Omit<fhir4.Condition, 'clinicalStatus' | 'verificationStatus'> { | ||
clinicalStatus: string; | ||
verificationStatus: string; | ||
} | ||
|
||
export interface DiagnosticReport extends fhir4.DiagnosticReport {} | ||
interface Observation extends Omit<fhir4.Observation, 'performer' | 'code'> { | ||
performer?: fhir4.Reference; | ||
code?: { coding: fhir4.Coding; text: string }; | ||
image: { | ||
comment: string; | ||
link: { | ||
reference: string; | ||
display: string; | ||
}; | ||
}[]; | ||
conclusion?: string; | ||
} | ||
|
||
export interface Procedure extends fhir4.Procedure {} | ||
export interface DiagnosticReport | ||
extends Omit<fhir4.DiagnosticReport, 'category' | 'result' | 'code'> { | ||
subject: fhir4.Reference & { noSep: string }; | ||
category?: { | ||
coding: fhir4.Coding; | ||
}; | ||
result?: Observation[]; | ||
code?: fhir4.CodeableConcept; | ||
} | ||
|
||
export interface Device extends fhir4.Device {} | ||
export interface Procedure extends fhir4.Procedure { | ||
context: fhir4.Reference; | ||
performer: (fhir4.ProcedurePerformer & { role: fhir4.CodeableConcept })[]; | ||
} | ||
|
||
export type JKNFhirResource = | ||
| Composition | ||
| Patient | ||
| Encounter | ||
| MedicationRequest | ||
| Practitioner | ||
| Organization | ||
| Condition | ||
| DiagnosticReport | ||
| Procedure | ||
| Device; | ||
export interface Device extends fhir4.Device { | ||
model: string; | ||
} | ||
|
||
export interface Bundle<T = JKNFhirResource> extends fhir4.Bundle<T> {} | ||
export interface MRBundle | ||
extends fhir4.Bundle< | ||
| Composition | ||
| Patient | ||
| Encounter | ||
| Practitioner | ||
| Organization | ||
| Condition | ||
| Array<MedicationRequest | DiagnosticReport | Procedure | Device> | ||
> {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ BYTAGRSP | |
BYVERRSP | ||
carakeluar | ||
checkstock | ||
Codeable | ||
createdtime | ||
daftarfp | ||
daftarresep | ||
|