@digitalmedika/satusehat 0.1.0

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 (44) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +135 -0
  3. package/dist/builders/cbc-panel-builder.d.ts +18 -0
  4. package/dist/builders/laboratory-panel-builder.d.ts +72 -0
  5. package/dist/builders/organization-builder.d.ts +23 -0
  6. package/dist/builders/service-request-specimen-observation-builder.d.ts +62 -0
  7. package/dist/client/auth.d.ts +11 -0
  8. package/dist/client/create-client.d.ts +5 -0
  9. package/dist/client/token-store.d.ts +7 -0
  10. package/dist/client/transport.d.ts +28 -0
  11. package/dist/core/errors.d.ts +25 -0
  12. package/dist/core/types.d.ts +293 -0
  13. package/dist/endpoints/condition.d.ts +945 -0
  14. package/dist/endpoints/diagnostic-report.d.ts +560 -0
  15. package/dist/endpoints/encounter.d.ts +1150 -0
  16. package/dist/endpoints/location.d.ts +500 -0
  17. package/dist/endpoints/medication-request.d.ts +1585 -0
  18. package/dist/endpoints/medication.d.ts +395 -0
  19. package/dist/endpoints/observation.d.ts +1415 -0
  20. package/dist/endpoints/organization.d.ts +454 -0
  21. package/dist/endpoints/patient.d.ts +72 -0
  22. package/dist/endpoints/practitioner-role.d.ts +425 -0
  23. package/dist/endpoints/practitioner.d.ts +210 -0
  24. package/dist/endpoints/procedure.d.ts +990 -0
  25. package/dist/endpoints/service-request.d.ts +1040 -0
  26. package/dist/endpoints/specimen.d.ts +1005 -0
  27. package/dist/index.d.ts +26 -0
  28. package/dist/index.js +21 -0
  29. package/dist/schemas/common.d.ts +328 -0
  30. package/dist/schemas/condition.d.ts +5314 -0
  31. package/dist/schemas/diagnostic-report.d.ts +2631 -0
  32. package/dist/schemas/encounter.d.ts +7087 -0
  33. package/dist/schemas/location.d.ts +2432 -0
  34. package/dist/schemas/medication-request.d.ts +12183 -0
  35. package/dist/schemas/medication.d.ts +2111 -0
  36. package/dist/schemas/observation.d.ts +9253 -0
  37. package/dist/schemas/organization.d.ts +3357 -0
  38. package/dist/schemas/patient.d.ts +418 -0
  39. package/dist/schemas/practitioner-role.d.ts +1930 -0
  40. package/dist/schemas/practitioner.d.ts +1626 -0
  41. package/dist/schemas/procedure.d.ts +5283 -0
  42. package/dist/schemas/service-request.d.ts +5268 -0
  43. package/dist/schemas/specimen.d.ts +6520 -0
  44. package/package.json +61 -0
@@ -0,0 +1,418 @@
1
+ import { z } from "zod";
2
+ export declare const PatientIdentifierSchema: z.ZodObject<{
3
+ system: z.ZodOptional<z.ZodString>;
4
+ use: z.ZodOptional<z.ZodString>;
5
+ value: z.ZodOptional<z.ZodString>;
6
+ }, "strip", z.ZodTypeAny, {
7
+ value?: string | undefined;
8
+ system?: string | undefined;
9
+ use?: string | undefined;
10
+ }, {
11
+ value?: string | undefined;
12
+ system?: string | undefined;
13
+ use?: string | undefined;
14
+ }>;
15
+ export declare const PatientSchema: z.ZodObject<{
16
+ resourceType: z.ZodLiteral<"Patient">;
17
+ id: z.ZodString;
18
+ active: z.ZodOptional<z.ZodBoolean>;
19
+ birthDate: z.ZodOptional<z.ZodString>;
20
+ gender: z.ZodOptional<z.ZodEnum<["male", "female", "other", "unknown"]>>;
21
+ identifier: z.ZodOptional<z.ZodArray<z.ZodObject<{
22
+ system: z.ZodOptional<z.ZodString>;
23
+ use: z.ZodOptional<z.ZodString>;
24
+ value: z.ZodOptional<z.ZodString>;
25
+ }, "strip", z.ZodTypeAny, {
26
+ value?: string | undefined;
27
+ system?: string | undefined;
28
+ use?: string | undefined;
29
+ }, {
30
+ value?: string | undefined;
31
+ system?: string | undefined;
32
+ use?: string | undefined;
33
+ }>, "many">>;
34
+ meta: z.ZodOptional<z.ZodObject<{
35
+ lastUpdated: z.ZodOptional<z.ZodString>;
36
+ profile: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
37
+ versionId: z.ZodOptional<z.ZodString>;
38
+ }, "strip", z.ZodTypeAny, {
39
+ lastUpdated?: string | undefined;
40
+ profile?: string[] | undefined;
41
+ versionId?: string | undefined;
42
+ }, {
43
+ lastUpdated?: string | undefined;
44
+ profile?: string[] | undefined;
45
+ versionId?: string | undefined;
46
+ }>>;
47
+ name: z.ZodOptional<z.ZodArray<z.ZodObject<{
48
+ use: z.ZodOptional<z.ZodString>;
49
+ text: z.ZodOptional<z.ZodString>;
50
+ family: z.ZodOptional<z.ZodString>;
51
+ given: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
52
+ prefix: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
53
+ suffix: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
54
+ }, "strip", z.ZodTypeAny, {
55
+ text?: string | undefined;
56
+ use?: string | undefined;
57
+ family?: string | undefined;
58
+ given?: string[] | undefined;
59
+ prefix?: string[] | undefined;
60
+ suffix?: string[] | undefined;
61
+ }, {
62
+ text?: string | undefined;
63
+ use?: string | undefined;
64
+ family?: string | undefined;
65
+ given?: string[] | undefined;
66
+ prefix?: string[] | undefined;
67
+ suffix?: string[] | undefined;
68
+ }>, "many">>;
69
+ }, "strip", z.ZodTypeAny, {
70
+ resourceType: "Patient";
71
+ id: string;
72
+ active?: boolean | undefined;
73
+ birthDate?: string | undefined;
74
+ gender?: "other" | "unknown" | "male" | "female" | undefined;
75
+ identifier?: {
76
+ value?: string | undefined;
77
+ system?: string | undefined;
78
+ use?: string | undefined;
79
+ }[] | undefined;
80
+ meta?: {
81
+ lastUpdated?: string | undefined;
82
+ profile?: string[] | undefined;
83
+ versionId?: string | undefined;
84
+ } | undefined;
85
+ name?: {
86
+ text?: string | undefined;
87
+ use?: string | undefined;
88
+ family?: string | undefined;
89
+ given?: string[] | undefined;
90
+ prefix?: string[] | undefined;
91
+ suffix?: string[] | undefined;
92
+ }[] | undefined;
93
+ }, {
94
+ resourceType: "Patient";
95
+ id: string;
96
+ active?: boolean | undefined;
97
+ birthDate?: string | undefined;
98
+ gender?: "other" | "unknown" | "male" | "female" | undefined;
99
+ identifier?: {
100
+ value?: string | undefined;
101
+ system?: string | undefined;
102
+ use?: string | undefined;
103
+ }[] | undefined;
104
+ meta?: {
105
+ lastUpdated?: string | undefined;
106
+ profile?: string[] | undefined;
107
+ versionId?: string | undefined;
108
+ } | undefined;
109
+ name?: {
110
+ text?: string | undefined;
111
+ use?: string | undefined;
112
+ family?: string | undefined;
113
+ given?: string[] | undefined;
114
+ prefix?: string[] | undefined;
115
+ suffix?: string[] | undefined;
116
+ }[] | undefined;
117
+ }>;
118
+ export declare const PatientSearchParamsSchema: z.ZodEffects<z.ZodObject<{
119
+ identifier: z.ZodOptional<z.ZodString>;
120
+ name: z.ZodOptional<z.ZodString>;
121
+ birthdate: z.ZodOptional<z.ZodString>;
122
+ gender: z.ZodOptional<z.ZodEnum<["male", "female"]>>;
123
+ nik: z.ZodOptional<z.ZodString>;
124
+ }, "strip", z.ZodTypeAny, {
125
+ gender?: "male" | "female" | undefined;
126
+ identifier?: string | undefined;
127
+ name?: string | undefined;
128
+ birthdate?: string | undefined;
129
+ nik?: string | undefined;
130
+ }, {
131
+ gender?: "male" | "female" | undefined;
132
+ identifier?: string | undefined;
133
+ name?: string | undefined;
134
+ birthdate?: string | undefined;
135
+ nik?: string | undefined;
136
+ }>, {
137
+ gender?: "male" | "female" | undefined;
138
+ identifier?: string | undefined;
139
+ name?: string | undefined;
140
+ birthdate?: string | undefined;
141
+ nik?: string | undefined;
142
+ }, {
143
+ gender?: "male" | "female" | undefined;
144
+ identifier?: string | undefined;
145
+ name?: string | undefined;
146
+ birthdate?: string | undefined;
147
+ nik?: string | undefined;
148
+ }>;
149
+ export declare const PatientBundleSchema: z.ZodObject<{
150
+ resourceType: z.ZodLiteral<"Bundle">;
151
+ type: z.ZodOptional<z.ZodString>;
152
+ total: z.ZodOptional<z.ZodNumber>;
153
+ link: z.ZodOptional<z.ZodArray<z.ZodObject<{
154
+ relation: z.ZodOptional<z.ZodString>;
155
+ url: z.ZodOptional<z.ZodString>;
156
+ }, "strip", z.ZodTypeAny, {
157
+ url?: string | undefined;
158
+ relation?: string | undefined;
159
+ }, {
160
+ url?: string | undefined;
161
+ relation?: string | undefined;
162
+ }>, "many">>;
163
+ entry: z.ZodOptional<z.ZodArray<z.ZodObject<{
164
+ fullUrl: z.ZodOptional<z.ZodString>;
165
+ resource: z.ZodObject<{
166
+ resourceType: z.ZodLiteral<"Patient">;
167
+ id: z.ZodString;
168
+ active: z.ZodOptional<z.ZodBoolean>;
169
+ birthDate: z.ZodOptional<z.ZodString>;
170
+ gender: z.ZodOptional<z.ZodEnum<["male", "female", "other", "unknown"]>>;
171
+ identifier: z.ZodOptional<z.ZodArray<z.ZodObject<{
172
+ system: z.ZodOptional<z.ZodString>;
173
+ use: z.ZodOptional<z.ZodString>;
174
+ value: z.ZodOptional<z.ZodString>;
175
+ }, "strip", z.ZodTypeAny, {
176
+ value?: string | undefined;
177
+ system?: string | undefined;
178
+ use?: string | undefined;
179
+ }, {
180
+ value?: string | undefined;
181
+ system?: string | undefined;
182
+ use?: string | undefined;
183
+ }>, "many">>;
184
+ meta: z.ZodOptional<z.ZodObject<{
185
+ lastUpdated: z.ZodOptional<z.ZodString>;
186
+ profile: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
187
+ versionId: z.ZodOptional<z.ZodString>;
188
+ }, "strip", z.ZodTypeAny, {
189
+ lastUpdated?: string | undefined;
190
+ profile?: string[] | undefined;
191
+ versionId?: string | undefined;
192
+ }, {
193
+ lastUpdated?: string | undefined;
194
+ profile?: string[] | undefined;
195
+ versionId?: string | undefined;
196
+ }>>;
197
+ name: z.ZodOptional<z.ZodArray<z.ZodObject<{
198
+ use: z.ZodOptional<z.ZodString>;
199
+ text: z.ZodOptional<z.ZodString>;
200
+ family: z.ZodOptional<z.ZodString>;
201
+ given: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
202
+ prefix: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
203
+ suffix: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
204
+ }, "strip", z.ZodTypeAny, {
205
+ text?: string | undefined;
206
+ use?: string | undefined;
207
+ family?: string | undefined;
208
+ given?: string[] | undefined;
209
+ prefix?: string[] | undefined;
210
+ suffix?: string[] | undefined;
211
+ }, {
212
+ text?: string | undefined;
213
+ use?: string | undefined;
214
+ family?: string | undefined;
215
+ given?: string[] | undefined;
216
+ prefix?: string[] | undefined;
217
+ suffix?: string[] | undefined;
218
+ }>, "many">>;
219
+ }, "strip", z.ZodTypeAny, {
220
+ resourceType: "Patient";
221
+ id: string;
222
+ active?: boolean | undefined;
223
+ birthDate?: string | undefined;
224
+ gender?: "other" | "unknown" | "male" | "female" | undefined;
225
+ identifier?: {
226
+ value?: string | undefined;
227
+ system?: string | undefined;
228
+ use?: string | undefined;
229
+ }[] | undefined;
230
+ meta?: {
231
+ lastUpdated?: string | undefined;
232
+ profile?: string[] | undefined;
233
+ versionId?: string | undefined;
234
+ } | undefined;
235
+ name?: {
236
+ text?: string | undefined;
237
+ use?: string | undefined;
238
+ family?: string | undefined;
239
+ given?: string[] | undefined;
240
+ prefix?: string[] | undefined;
241
+ suffix?: string[] | undefined;
242
+ }[] | undefined;
243
+ }, {
244
+ resourceType: "Patient";
245
+ id: string;
246
+ active?: boolean | undefined;
247
+ birthDate?: string | undefined;
248
+ gender?: "other" | "unknown" | "male" | "female" | undefined;
249
+ identifier?: {
250
+ value?: string | undefined;
251
+ system?: string | undefined;
252
+ use?: string | undefined;
253
+ }[] | undefined;
254
+ meta?: {
255
+ lastUpdated?: string | undefined;
256
+ profile?: string[] | undefined;
257
+ versionId?: string | undefined;
258
+ } | undefined;
259
+ name?: {
260
+ text?: string | undefined;
261
+ use?: string | undefined;
262
+ family?: string | undefined;
263
+ given?: string[] | undefined;
264
+ prefix?: string[] | undefined;
265
+ suffix?: string[] | undefined;
266
+ }[] | undefined;
267
+ }>;
268
+ search: z.ZodOptional<z.ZodObject<{
269
+ mode: z.ZodOptional<z.ZodString>;
270
+ }, "strip", z.ZodTypeAny, {
271
+ mode?: string | undefined;
272
+ }, {
273
+ mode?: string | undefined;
274
+ }>>;
275
+ }, "strip", z.ZodTypeAny, {
276
+ resource: {
277
+ resourceType: "Patient";
278
+ id: string;
279
+ active?: boolean | undefined;
280
+ birthDate?: string | undefined;
281
+ gender?: "other" | "unknown" | "male" | "female" | undefined;
282
+ identifier?: {
283
+ value?: string | undefined;
284
+ system?: string | undefined;
285
+ use?: string | undefined;
286
+ }[] | undefined;
287
+ meta?: {
288
+ lastUpdated?: string | undefined;
289
+ profile?: string[] | undefined;
290
+ versionId?: string | undefined;
291
+ } | undefined;
292
+ name?: {
293
+ text?: string | undefined;
294
+ use?: string | undefined;
295
+ family?: string | undefined;
296
+ given?: string[] | undefined;
297
+ prefix?: string[] | undefined;
298
+ suffix?: string[] | undefined;
299
+ }[] | undefined;
300
+ };
301
+ fullUrl?: string | undefined;
302
+ search?: {
303
+ mode?: string | undefined;
304
+ } | undefined;
305
+ }, {
306
+ resource: {
307
+ resourceType: "Patient";
308
+ id: string;
309
+ active?: boolean | undefined;
310
+ birthDate?: string | undefined;
311
+ gender?: "other" | "unknown" | "male" | "female" | undefined;
312
+ identifier?: {
313
+ value?: string | undefined;
314
+ system?: string | undefined;
315
+ use?: string | undefined;
316
+ }[] | undefined;
317
+ meta?: {
318
+ lastUpdated?: string | undefined;
319
+ profile?: string[] | undefined;
320
+ versionId?: string | undefined;
321
+ } | undefined;
322
+ name?: {
323
+ text?: string | undefined;
324
+ use?: string | undefined;
325
+ family?: string | undefined;
326
+ given?: string[] | undefined;
327
+ prefix?: string[] | undefined;
328
+ suffix?: string[] | undefined;
329
+ }[] | undefined;
330
+ };
331
+ fullUrl?: string | undefined;
332
+ search?: {
333
+ mode?: string | undefined;
334
+ } | undefined;
335
+ }>, "many">>;
336
+ }, "strip", z.ZodTypeAny, {
337
+ resourceType: "Bundle";
338
+ type?: string | undefined;
339
+ total?: number | undefined;
340
+ link?: {
341
+ url?: string | undefined;
342
+ relation?: string | undefined;
343
+ }[] | undefined;
344
+ entry?: {
345
+ resource: {
346
+ resourceType: "Patient";
347
+ id: string;
348
+ active?: boolean | undefined;
349
+ birthDate?: string | undefined;
350
+ gender?: "other" | "unknown" | "male" | "female" | undefined;
351
+ identifier?: {
352
+ value?: string | undefined;
353
+ system?: string | undefined;
354
+ use?: string | undefined;
355
+ }[] | undefined;
356
+ meta?: {
357
+ lastUpdated?: string | undefined;
358
+ profile?: string[] | undefined;
359
+ versionId?: string | undefined;
360
+ } | undefined;
361
+ name?: {
362
+ text?: string | undefined;
363
+ use?: string | undefined;
364
+ family?: string | undefined;
365
+ given?: string[] | undefined;
366
+ prefix?: string[] | undefined;
367
+ suffix?: string[] | undefined;
368
+ }[] | undefined;
369
+ };
370
+ fullUrl?: string | undefined;
371
+ search?: {
372
+ mode?: string | undefined;
373
+ } | undefined;
374
+ }[] | undefined;
375
+ }, {
376
+ resourceType: "Bundle";
377
+ type?: string | undefined;
378
+ total?: number | undefined;
379
+ link?: {
380
+ url?: string | undefined;
381
+ relation?: string | undefined;
382
+ }[] | undefined;
383
+ entry?: {
384
+ resource: {
385
+ resourceType: "Patient";
386
+ id: string;
387
+ active?: boolean | undefined;
388
+ birthDate?: string | undefined;
389
+ gender?: "other" | "unknown" | "male" | "female" | undefined;
390
+ identifier?: {
391
+ value?: string | undefined;
392
+ system?: string | undefined;
393
+ use?: string | undefined;
394
+ }[] | undefined;
395
+ meta?: {
396
+ lastUpdated?: string | undefined;
397
+ profile?: string[] | undefined;
398
+ versionId?: string | undefined;
399
+ } | undefined;
400
+ name?: {
401
+ text?: string | undefined;
402
+ use?: string | undefined;
403
+ family?: string | undefined;
404
+ given?: string[] | undefined;
405
+ prefix?: string[] | undefined;
406
+ suffix?: string[] | undefined;
407
+ }[] | undefined;
408
+ };
409
+ fullUrl?: string | undefined;
410
+ search?: {
411
+ mode?: string | undefined;
412
+ } | undefined;
413
+ }[] | undefined;
414
+ }>;
415
+ export type PatientIdentifier = z.infer<typeof PatientIdentifierSchema>;
416
+ export type Patient = z.infer<typeof PatientSchema>;
417
+ export type PatientSearchParams = z.infer<typeof PatientSearchParamsSchema>;
418
+ export type PatientSearchResponse = z.infer<typeof PatientBundleSchema>;