diff --git a/.changeset/empty-llamas-tie.md b/.changeset/empty-llamas-tie.md new file mode 100644 index 0000000..92dbc26 --- /dev/null +++ b/.changeset/empty-llamas-tie.md @@ -0,0 +1,5 @@ +--- +'@ssecd/jkn': patch +--- + +fix missing "List Rujukan Khusus" api diff --git a/src/vclaim/rujukan.ts b/src/vclaim/rujukan.ts index ec62684..6b3a3dd 100644 --- a/src/vclaim/rujukan.ts +++ b/src/vclaim/rujukan.ts @@ -256,6 +256,32 @@ export class Rujukan extends VClaimBaseApi { }); } + /** + * List data rujukan khusus + */ + async listKhusus(params: { + /** bulan dimulai dari 1 (Januari) */ + bulan: number; + + /** misalnya 2020 */ + tahun: number; + }) { + return this.send<{ + rujukan: { + idrujukan: string; + norujukan: string; + nokapst: string; + nmpst: string; + diagppk: string; + tglrujukan_awal: string; + tglrujukan_berakhir: string; + }[]; + }>({ + path: `/Rujukan/Khusus/List/Bulan/${params.bulan}/Tahun/${params.tahun}`, + method: 'GET' + }); + } + /** * Insert rujukan menggunakan versi 2.0 */ diff --git a/test/vclaim/rujukan.test.ts b/test/vclaim/rujukan.test.ts index 490ec4d..7df276c 100644 --- a/test/vclaim/rujukan.test.ts +++ b/test/vclaim/rujukan.test.ts @@ -32,6 +32,15 @@ describe( expect(result.response?.rujukan[0].peserta.noKartu).toBe('0002084717968'); }); + it.concurrent('listKhusus() - 200 ok', async () => { + const result = await jkn.vclaim.rujukan.listKhusus({ + bulan: 7, + tahun: 2023 + }); + expect(result.metaData.code).toBe('200'); + expect(result.response?.rujukan).not.toBeFalsy(); + }); + it.concurrent('listSpesialistik() - 200 ok', async () => { const result = await jkn.vclaim.rujukan.listSpesialistik({ kodePpk: '0089S002', diff --git a/words.txt b/words.txt index 6fe3cdf..ce21b0b 100644 --- a/words.txt +++ b/words.txt @@ -43,6 +43,7 @@ HFIS Histori icare ICCU +idrujukan IDUSERSJP Inacbg Insertdate