@bahmni/clinical-app 0.0.1-dev.388 → 0.0.1-dev.389

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.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { cN as c } from "./index-DC74XeGg.js";
1
+ import { cN as c } from "./index-C4xAP_NB.js";
2
2
  export {
3
3
  c as ClinicalApp
4
4
  };
@@ -385,6 +385,8 @@
385
385
  "MEDICATIONS_STATUS_SCHEDULED": "Scheduled",
386
386
  "MEDICATIONS_STATUS_STOPPED": "Stopped",
387
387
  "MEDICATIONS_STATUS_UNKNOWN": "Unknown",
388
+ "MEDICATIONS_CANCELLATION_NOTE": "Cancellation note",
389
+ "MEDICATIONS_ORDER_NOTE": "Order note",
388
390
  "MEDICATIONS_STOPPED_DUE_TO": "due to",
389
391
  "MEDICATIONS_STOPPED_ON": "Stopped on",
390
392
  "MEDICATIONS_TABLE_ARIA_LABEL": "Medications table",
@@ -543,8 +545,9 @@
543
545
  "STOP_MEDICATION_FORM_TITLE": "Stop Medication",
544
546
  "STOP_MEDICATION_MESSAGE": "Stopped a medication for patient",
545
547
  "STOP_MEDICATION_NAME_LABEL": "Medication name",
546
- "STOP_MEDICATION_NOTE_LABEL": "Description",
547
- "STOP_MEDICATION_NOTE_PLACEHOLDER": "Enter description",
548
+ "STOP_MEDICATION_ADD_NOTE": "Add Note",
549
+ "STOP_MEDICATION_NOTE_LABEL": "Note",
550
+ "STOP_MEDICATION_NOTE_PLACEHOLDER": "Enter note",
548
551
  "STOP_MEDICATION_NOTE_REQUIRED": "Note is required",
549
552
  "STOP_MEDICATION_REASON_LABEL": "Stop reason",
550
553
  "STOP_MEDICATION_REASON_REQUIRED": "Stop reason is required",
@@ -1,26 +1,19 @@
1
- import { MedicationRequest } from 'fhir/r4';
1
+ import { BundleEntry } from 'fhir/r4';
2
+ import { EncounterContext } from '../components/forms/models';
3
+ export declare const FHIR_EXT_MEDICATION_REQUEST_DATE_STOPPED = "http://fhir.bahmni.org/ext/medicationRequest/dateStopped";
2
4
  export interface StopReason {
3
5
  uuid: string;
4
6
  display: string;
5
7
  }
6
- /**
7
- * Fetches stop reasons from the FHIR ValueSet "Stopped Order Reason".
8
- *
9
- * 1. Searches: GET /ws/fhir2/R4/ValueSet?title=Stopped+Order+Reason
10
- * 2. Expands: GET /ws/fhir2/R4/ValueSet/{uuid}/$expand
11
- * 3. Returns the expanded concepts as stop reasons
12
- */
13
- export declare function fetchStopReasons(): Promise<StopReason[]>;
14
- interface StopMedicationParams {
8
+ export declare function fetchStopReasons(conceptSetUuid: string): Promise<StopReason[]>;
9
+ interface StopMedicationEntryParams {
15
10
  medicationRequestId: string;
16
- reason: string;
11
+ patientUuid: string;
12
+ reason: StopReason;
17
13
  effectiveDate: Date;
18
14
  note?: string;
15
+ ctx: EncounterContext;
19
16
  }
20
- /**
21
- * Calls the FHIR $stop operation on a MedicationRequest.
22
- * POST /openmrs/ws/fhir2/R4/MedicationRequest/{id}/$stop
23
- */
24
- export declare function stopMedication(params: StopMedicationParams): Promise<MedicationRequest>;
17
+ export declare function createStopMedicationEntry({ medicationRequestId, patientUuid, reason, effectiveDate, note, ctx, }: StopMedicationEntryParams): BundleEntry;
25
18
  export {};
26
19
  //# sourceMappingURL=stopMedicationService.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stopMedicationService.d.ts","sourceRoot":"","sources":["../../src/services/stopMedicationService.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAoB,MAAM,SAAS,CAAC;AAO9D,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;GAMG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC,CAqB9D;AAED,UAAU,oBAAoB;IAC5B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,aAAa,EAAE,IAAI,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,oBAAoB,GAC3B,OAAO,CAAC,iBAAiB,CAAC,CAmB5B"}
1
+ {"version":3,"file":"stopMedicationService.d.ts","sourceRoot":"","sources":["../../src/services/stopMedicationService.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,WAAW,EAAuC,MAAM,SAAS,CAAC;AAC3E,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAInE,eAAO,MAAM,wCAAwC,6DACO,CAAC;AAE7D,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAKD,wBAAsB,gBAAgB,CACpC,cAAc,EAAE,MAAM,GACrB,OAAO,CAAC,UAAU,EAAE,CAAC,CA2BvB;AAED,UAAU,yBAAyB;IACjC,mBAAmB,EAAE,MAAM,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,UAAU,CAAC;IACnB,aAAa,EAAE,IAAI,CAAC;IACpB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,gBAAgB,CAAC;CACvB;AAED,wBAAgB,yBAAyB,CAAC,EACxC,mBAAmB,EACnB,WAAW,EACX,MAAM,EACN,aAAa,EACb,IAAI,EACJ,GAAG,GACJ,EAAE,yBAAyB,GAAG,WAAW,CA4CzC"}
@@ -1,14 +1,15 @@
1
1
  import { MedicationRequest } from 'fhir/r4';
2
2
  import { StopMedicationConfig } from '../models/medicationConfig';
3
+ import { StopReason } from '../services/stopMedicationService';
3
4
  export interface StopMedicationState {
4
5
  stopDate: Date;
5
- stopReason: string | null;
6
+ stopReason: StopReason | null;
6
7
  note: string;
7
8
  medicationToStop: MedicationRequest | null;
8
9
  fieldConfig: StopMedicationConfig;
9
10
  errors: Record<string, string>;
10
11
  setStopDate: (date: Date) => void;
11
- setStopReason: (reason: string | null) => void;
12
+ setStopReason: (reason: StopReason | null) => void;
12
13
  setNote: (note: string) => void;
13
14
  setMedicationToStop: (medication: MedicationRequest | null) => void;
14
15
  setFieldConfig: (config: StopMedicationConfig) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"stopMedicationsStore.d.ts","sourceRoot":"","sources":["../../src/stores/stopMedicationsStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAElE,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,IAAI,CAAC;IACf,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAC3C,WAAW,EAAE,oBAAoB,CAAC;IAClC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAE/B,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAClC,aAAa,EAAE,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAC;IAC/C,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,mBAAmB,EAAE,CAAC,UAAU,EAAE,iBAAiB,GAAG,IAAI,KAAK,IAAI,CAAC;IACpE,cAAc,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAC;IACvD,QAAQ,EAAE,MAAM,OAAO,CAAC;IACxB,OAAO,EAAE,MAAM,OAAO,CAAC;IACvB,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAQD,eAAO,MAAM,sBAAsB,kFAoGlC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"stopMedicationsStore.d.ts","sourceRoot":"","sources":["../../src/stores/stopMedicationsStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAE5C,OAAO,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAE/D,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,IAAI,CAAC;IACf,UAAU,EAAE,UAAU,GAAG,IAAI,CAAC;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,gBAAgB,EAAE,iBAAiB,GAAG,IAAI,CAAC;IAC3C,WAAW,EAAE,oBAAoB,CAAC;IAClC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAE/B,WAAW,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,IAAI,CAAC;IAClC,aAAa,EAAE,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,KAAK,IAAI,CAAC;IACnD,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,mBAAmB,EAAE,CAAC,UAAU,EAAE,iBAAiB,GAAG,IAAI,KAAK,IAAI,CAAC;IACpE,cAAc,EAAE,CAAC,MAAM,EAAE,oBAAoB,KAAK,IAAI,CAAC;IACvD,QAAQ,EAAE,MAAM,OAAO,CAAC;IACxB,OAAO,EAAE,MAAM,OAAO,CAAC;IACvB,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB;AAQD,eAAO,MAAM,sBAAsB,kFAmGlC,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bahmni/clinical-app",
3
- "version": "0.0.1-dev.388",
3
+ "version": "0.0.1-dev.389",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",