Skip to content

Commit c86f312

Browse files
authored
fix: medical record api (#125)
1 parent c7e117c commit c86f312

5 files changed

Lines changed: 20 additions & 8 deletions

File tree

.changeset/light-cameras-learn.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@ssecd/jkn': patch
3+
---
4+
5+
Update Medical Record API

.github/workflows/release.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
- closed
1010

1111
permissions:
12+
id-token: write
1213
contents: write
1314
pull-requests: write
1415

@@ -18,8 +19,9 @@ jobs:
1819
release:
1920
# prevents from running on forks
2021
if: >
21-
github.event_name == 'workflow_dispatch' ||
22-
(github.event_name == 'pull_request' && github.event.pull_request.merged == true)
22+
(github.event_name == 'workflow_dispatch' ||
23+
(github.event_name == 'pull_request' && github.event.pull_request.merged == true))
24+
&& github.repository == 'ssecd/jkn'
2325
runs-on: ubuntu-latest
2426
steps:
2527
- name: Checkout repo
@@ -34,7 +36,7 @@ jobs:
3436
- name: Setup Node
3537
uses: actions/setup-node@v4
3638
with:
37-
node-version: 22.x
39+
node-version: 24.x
3840
cache: pnpm
3941

4042
- name: Install dependencies
@@ -54,4 +56,3 @@ jobs:
5456
publish: pnpm release
5557
env:
5658
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ JKN (BPJS) Bridging API untuk NodeJS
99
- ✅ Antrean
1010
- ✅ Apotek
1111
- ✅ i-Care
12-
- ✅ Rekam Medis _(Experimental types)_
12+
- ✅ Rekam Medis
1313
- 🧩 PCare _([partial](https://github.com/ssecd/jkn/pull/26))_
1414

1515
## Demo

src/fetcher.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ const defaultBaseUrls: Record<Type, Record<Mode, string>> = {
196196
},
197197
rekamMedis: {
198198
development: 'https://apijkn-dev.bpjs-kesehatan.go.id/erekammedis_dev',
199-
production: 'https://apijkn.bpjs-kesehatan.go.id/erekammedis'
199+
production: 'https://apijkn.bpjs-kesehatan.go.id/medicalrecord'
200200
}
201201
};
202202

src/rekam-medis/types.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
export interface Composition extends Omit<fhir4.Composition, 'section'> {
77
section: {
8-
[key: string]: fhir4.CompositionSection;
8+
[key: string]: Omit<fhir4.CompositionSection, 'entry'> & { entry: string };
99
};
1010
}
1111

@@ -54,7 +54,10 @@ export interface Condition extends Omit<fhir4.Condition, 'clinicalStatus' | 'ver
5454
verificationStatus: string;
5555
}
5656

57-
interface Observation extends Omit<fhir4.Observation, 'performer' | 'code'> {
57+
interface Observation extends Omit<
58+
fhir4.Observation,
59+
'performer' | 'code' | 'interpretation' | 'referenceRange' | 'valueQuantity'
60+
> {
5861
performer?: fhir4.Reference;
5962
code?: { coding: fhir4.Coding; text: string };
6063
image: {
@@ -65,6 +68,9 @@ interface Observation extends Omit<fhir4.Observation, 'performer' | 'code'> {
6568
};
6669
}[];
6770
conclusion?: string;
71+
interpretation: Omit<fhir4.CodeableConcept, 'coding'> & { coding: fhir4.Coding };
72+
referenceRange: fhir4.ObservationReferenceRange;
73+
valueQuantity: Omit<fhir4.Quantity, 'value'> & { value: string };
6874
}
6975

7076
export interface DiagnosticReport extends Omit<

0 commit comments

Comments
 (0)