Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/light-cameras-learn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@ssecd/jkn': patch
---

Update Medical Record API
9 changes: 5 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
- closed

permissions:
id-token: write
contents: write
pull-requests: write

Expand All @@ -18,8 +19,9 @@ jobs:
release:
# prevents from running on forks
if: >
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'pull_request' && github.event.pull_request.merged == true)
(github.event_name == 'workflow_dispatch' ||
(github.event_name == 'pull_request' && github.event.pull_request.merged == true))
&& github.repository == 'ssecd/jkn'
runs-on: ubuntu-latest
steps:
- name: Checkout repo
Expand All @@ -34,7 +36,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22.x
node-version: 24.x
cache: pnpm

- name: Install dependencies
Expand All @@ -54,4 +56,3 @@ jobs:
publish: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ JKN (BPJS) Bridging API untuk NodeJS
- ✅ Antrean
- ✅ Apotek
- ✅ i-Care
- ✅ Rekam Medis _(Experimental types)_
- ✅ Rekam Medis
- 🧩 PCare _([partial](https://github.com/ssecd/jkn/pull/26))_

## Demo
Expand Down
2 changes: 1 addition & 1 deletion src/fetcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ const defaultBaseUrls: Record<Type, Record<Mode, string>> = {
},
rekamMedis: {
development: 'https://apijkn-dev.bpjs-kesehatan.go.id/erekammedis_dev',
production: 'https://apijkn.bpjs-kesehatan.go.id/erekammedis'
production: 'https://apijkn.bpjs-kesehatan.go.id/medicalrecord'
}
};

Expand Down
10 changes: 8 additions & 2 deletions src/rekam-medis/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

export interface Composition extends Omit<fhir4.Composition, 'section'> {
section: {
[key: string]: fhir4.CompositionSection;
[key: string]: Omit<fhir4.CompositionSection, 'entry'> & { entry: string };
};
}

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

interface Observation extends Omit<fhir4.Observation, 'performer' | 'code'> {
interface Observation extends Omit<
fhir4.Observation,
'performer' | 'code' | 'interpretation' | 'referenceRange' | 'valueQuantity'
> {
performer?: fhir4.Reference;
code?: { coding: fhir4.Coding; text: string };
image: {
Expand All @@ -65,6 +68,9 @@ interface Observation extends Omit<fhir4.Observation, 'performer' | 'code'> {
};
}[];
conclusion?: string;
interpretation: Omit<fhir4.CodeableConcept, 'coding'> & { coding: fhir4.Coding };
referenceRange: fhir4.ObservationReferenceRange;
valueQuantity: Omit<fhir4.Quantity, 'value'> & { value: string };
}

export interface DiagnosticReport extends Omit<
Expand Down