@bahmni/widgets 0.0.1-dev.80 → 0.0.1-dev.84
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.css +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14845 -14945
- package/dist/patientPrograms/PatientProgramsTable.d.ts +13 -0
- package/dist/patientPrograms/PatientProgramsTable.d.ts.map +1 -0
- package/dist/patientPrograms/constants.d.ts +2 -0
- package/dist/patientPrograms/constants.d.ts.map +1 -0
- package/dist/patientPrograms/index.d.ts +2 -0
- package/dist/patientPrograms/index.d.ts.map +1 -0
- package/dist/patientPrograms/model.d.ts +15 -0
- package/dist/patientPrograms/model.d.ts.map +1 -0
- package/dist/patientPrograms/utils.d.ts +9 -0
- package/dist/patientPrograms/utils.d.ts.map +1 -0
- package/package.json +1 -1
- package/dist/programs/index.d.ts +0 -5
- package/dist/programs/index.d.ts.map +0 -1
- package/dist/programs/model.d.ts +0 -28
- package/dist/programs/model.d.ts.map +0 -1
- package/dist/programs/programsDetails.d.ts +0 -12
- package/dist/programs/programsDetails.d.ts.map +0 -1
- package/dist/programs/usePrograms.d.ts +0 -7
- package/dist/programs/usePrograms.d.ts.map +0 -1
- package/dist/programs/utils.d.ts +0 -13
- package/dist/programs/utils.d.ts.map +0 -1
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export declare const programsQueryKeys: (patientUUID: string, programAttributes: string[]) => readonly ["programs", string, string[]];
|
|
3
|
+
interface PatientProgramsTableProps {
|
|
4
|
+
config: {
|
|
5
|
+
fields: string[];
|
|
6
|
+
};
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Component to display patient programs using SortableDataTable
|
|
10
|
+
*/
|
|
11
|
+
declare const PatientProgramsTable: React.FC<PatientProgramsTableProps>;
|
|
12
|
+
export default PatientProgramsTable;
|
|
13
|
+
//# sourceMappingURL=PatientProgramsTable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PatientProgramsTable.d.ts","sourceRoot":"","sources":["../../src/patientPrograms/PatientProgramsTable.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAUvC,eAAO,MAAM,iBAAiB,GAC5B,aAAa,MAAM,EACnB,mBAAmB,MAAM,EAAE,4CAC6B,CAAC;AAU3D,UAAU,yBAAyB;IACjC,MAAM,EAAE;QACN,MAAM,EAAE,MAAM,EAAE,CAAC;KAClB,CAAC;CACH;AAED;;GAEG;AACH,QAAA,MAAM,oBAAoB,EAAE,KAAK,CAAC,EAAE,CAAC,yBAAyB,CAoH7D,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/patientPrograms/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,EAAE,MAAM,EAMhC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/patientPrograms/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,IAAI,oBAAoB,EAC/B,iBAAiB,GAClB,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interface representing a formatted program for easier consumption by components
|
|
3
|
+
*/
|
|
4
|
+
export interface PatientProgramViewModel {
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly uuid: string;
|
|
7
|
+
readonly programName: string;
|
|
8
|
+
readonly dateEnrolled: string;
|
|
9
|
+
readonly dateCompleted: string | null;
|
|
10
|
+
readonly outcomeName: string | null;
|
|
11
|
+
readonly outcomeDetails: string | null;
|
|
12
|
+
readonly currentStateName: string | null;
|
|
13
|
+
readonly attributes: Record<string, string | null>;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=model.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/patientPrograms/model.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,QAAQ,CAAC,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC;CACpD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PatientProgramsResponse } from '@bahmni/services';
|
|
2
|
+
import { PatientProgramViewModel } from './model';
|
|
3
|
+
export declare function extractProgramAttributeNames(fields?: string[]): string[];
|
|
4
|
+
export declare function createProgramHeaders(fields: string[], t: (key: string) => string): Array<{
|
|
5
|
+
key: string;
|
|
6
|
+
header: string;
|
|
7
|
+
}>;
|
|
8
|
+
export declare function createPatientProgramViewModal(programs: PatientProgramsResponse, programAttributes: string[]): PatientProgramViewModel[];
|
|
9
|
+
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/patientPrograms/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAE3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAUlD,wBAAgB,4BAA4B,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAGxE;AAED,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,MAAM,EAAE,EAChB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,MAAM,GACzB,KAAK,CAAC;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAKxC;AAwDD,wBAAgB,6BAA6B,CAC3C,QAAQ,EAAE,uBAAuB,EACjC,iBAAiB,EAAE,MAAM,EAAE,GAC1B,uBAAuB,EAAE,CAyB3B"}
|
package/package.json
CHANGED
package/dist/programs/index.d.ts
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { default as ProgramsDetails } from './programsDetails';
|
|
2
|
-
export { ProgramStatus } from './model';
|
|
3
|
-
export type { formattedProgram as ProgramViewModel } from './model';
|
|
4
|
-
export { default as usePrograms } from './usePrograms';
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/programs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACxC,YAAY,EAAE,gBAAgB,IAAI,gBAAgB,EAAE,MAAM,SAAS,CAAC;AACpE,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC"}
|
package/dist/programs/model.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export declare enum ProgramStatus {
|
|
2
|
-
InProgress = "in-progress",
|
|
3
|
-
Submitted = "submitted",
|
|
4
|
-
Finalised = "finalised",
|
|
5
|
-
Completed = "completed",
|
|
6
|
-
OnHold = "on-hold",
|
|
7
|
-
Cancelled = "cancelled",
|
|
8
|
-
Abandoned = "abandoned"
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Interface representing a formatted program for easier consumption by components
|
|
12
|
-
*/
|
|
13
|
-
export interface formattedProgram {
|
|
14
|
-
readonly id: string;
|
|
15
|
-
readonly uuid: string;
|
|
16
|
-
readonly programName: string;
|
|
17
|
-
readonly referenceNumber: string;
|
|
18
|
-
readonly destination: string | null;
|
|
19
|
-
readonly dateEnrolled: string;
|
|
20
|
-
readonly dateEnded: string | null;
|
|
21
|
-
readonly outcome: string | null;
|
|
22
|
-
readonly outcomeDetails: string | null;
|
|
23
|
-
readonly status: ProgramStatus;
|
|
24
|
-
readonly statusKey: string;
|
|
25
|
-
readonly statusClassName: string;
|
|
26
|
-
readonly attributes: Record<string, string>;
|
|
27
|
-
}
|
|
28
|
-
//# sourceMappingURL=model.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"model.d.ts","sourceRoot":"","sources":["../../src/programs/model.ts"],"names":[],"mappings":"AAAA,oBAAY,aAAa;IACvB,UAAU,gBAAgB;IAC1B,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,SAAS,cAAc;IACvB,MAAM,YAAY;IAClB,SAAS,cAAc;IACvB,SAAS,cAAc;CACxB;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IAClC,QAAQ,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,QAAQ,CAAC,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IACvC,QAAQ,CAAC,MAAM,EAAE,aAAa,CAAC;IAC/B,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC7C"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { default as React } from 'react';
|
|
2
|
-
interface ProgramsDetailsProps {
|
|
3
|
-
config?: {
|
|
4
|
-
fields?: string[];
|
|
5
|
-
};
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Component to display patient programs using SortableDataTable
|
|
9
|
-
*/
|
|
10
|
-
declare const ProgramsDetails: React.FC<ProgramsDetailsProps>;
|
|
11
|
-
export default ProgramsDetails;
|
|
12
|
-
//# sourceMappingURL=programsDetails.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"programsDetails.d.ts","sourceRoot":"","sources":["../../src/programs/programsDetails.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAMvC,UAAU,oBAAoB;IAC5B,MAAM,CAAC,EAAE;QACP,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;KACnB,CAAC;CACH;AAaD;;GAEG;AACH,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAqGnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"usePrograms.d.ts","sourceRoot":"","sources":["../../src/programs/usePrograms.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAG3C,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,YAAY,CAAC,EAAE,MAAM,EAAE;;;;EA2C1D"}
|
package/dist/programs/utils.d.ts
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { ProgramEnrollment } from '@bahmni/services';
|
|
2
|
-
import { formattedProgram } from './model';
|
|
3
|
-
export declare function parseAttributeField(field: string): {
|
|
4
|
-
isAttribute: boolean;
|
|
5
|
-
attributeName: string | null;
|
|
6
|
-
fieldKey: string;
|
|
7
|
-
path: string | null;
|
|
8
|
-
property: string | null;
|
|
9
|
-
};
|
|
10
|
-
export declare function generateTranslationKey(path: string, property: string): string;
|
|
11
|
-
export declare function getValueByPath(program: ProgramEnrollment, path: string, property: string): string;
|
|
12
|
-
export declare function mapPrograms(programs: ProgramEnrollment[], configFields?: string[]): formattedProgram[];
|
|
13
|
-
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/programs/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,gBAAgB,EAAiB,MAAM,SAAS,CAAC;AAyH1D,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG;IAClD,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB,CAkBA;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAI7E;AAcD,wBAAgB,cAAc,CAC5B,OAAO,EAAE,iBAAiB,EAC1B,IAAI,EAAE,MAAM,EACZ,QAAQ,EAAE,MAAM,GACf,MAAM,CAoCR;AAED,wBAAgB,WAAW,CACzB,QAAQ,EAAE,iBAAiB,EAAE,EAC7B,YAAY,CAAC,EAAE,MAAM,EAAE,GACtB,gBAAgB,EAAE,CAEpB"}
|