@bahmni/services 0.0.1-dev.100 → 0.0.1-dev.105
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/api/api.d.ts +7 -0
- package/dist/api/api.d.ts.map +1 -1
- package/dist/api/index.d.ts +1 -1
- package/dist/api/index.d.ts.map +1 -1
- package/dist/encounterService/__mocks__/mocks.d.ts +25 -0
- package/dist/encounterService/__mocks__/mocks.d.ts.map +1 -1
- package/dist/encounterService/constants.d.ts +1 -0
- package/dist/encounterService/constants.d.ts.map +1 -1
- package/dist/encounterService/encounterService.d.ts +8 -0
- package/dist/encounterService/encounterService.d.ts.map +1 -1
- package/dist/encounterService/index.d.ts +2 -1
- package/dist/encounterService/index.d.ts.map +1 -1
- package/dist/encounterService/models.d.ts +31 -0
- package/dist/encounterService/models.d.ts.map +1 -0
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +459 -437
- package/dist/observationFormsService/constants.d.ts +1 -0
- package/dist/observationFormsService/constants.d.ts.map +1 -1
- package/dist/observationFormsService/index.d.ts +2 -2
- package/dist/observationFormsService/index.d.ts.map +1 -1
- package/dist/observationFormsService/models.d.ts +14 -0
- package/dist/observationFormsService/models.d.ts.map +1 -1
- package/dist/observationFormsService/observationFormsService.d.ts +9 -1
- package/dist/observationFormsService/observationFormsService.d.ts.map +1 -1
- package/dist/patientService/constants.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -3,4 +3,5 @@ export declare const OBSERVATION_FORMS_URL: string;
|
|
|
3
3
|
export declare const USER_PINNED_PREFERENCE_URL: (userUuid: string) => string;
|
|
4
4
|
export declare const FORM_TRANSLATIONS_URL: (formName: string, formUuid: string, formVersion: string, locale: string) => string;
|
|
5
5
|
export declare const DEFAULT_FORM_NAMESPACE = "Bahmni";
|
|
6
|
+
export declare const FORM_DATA_URL: (patientUuid: string, numberOfVisits?: number, episodeUuid?: string) => string;
|
|
6
7
|
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/observationFormsService/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,GAAI,UAAU,MAAM,WACkB,CAAC;AACrE,eAAO,MAAM,qBAAqB,QACuB,CAAC;AAC1D,eAAO,MAAM,0BAA0B,GAAI,UAAU,MAAM,WACb,CAAC;AAC/C,eAAO,MAAM,qBAAqB,GAChC,UAAU,MAAM,EAChB,UAAU,MAAM,EAChB,aAAa,MAAM,EACnB,QAAQ,MAAM,WAGyH,CAAC;AAE1I,eAAO,MAAM,sBAAsB,WAAW,CAAC"}
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/observationFormsService/constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB,GAAI,UAAU,MAAM,WACkB,CAAC;AACrE,eAAO,MAAM,qBAAqB,QACuB,CAAC;AAC1D,eAAO,MAAM,0BAA0B,GAAI,UAAU,MAAM,WACb,CAAC;AAC/C,eAAO,MAAM,qBAAqB,GAChC,UAAU,MAAM,EAChB,UAAU,MAAM,EAChB,aAAa,MAAM,EACnB,QAAQ,MAAM,WAGyH,CAAC;AAE1I,eAAO,MAAM,sBAAsB,WAAW,CAAC;AAE/C,eAAO,MAAM,aAAa,GACxB,aAAa,MAAM,EACnB,iBAAiB,MAAM,EACvB,cAAc,MAAM,WAWrB,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { fetchObservationForms, fetchFormMetadata, } from './observationFormsService';
|
|
2
|
-
export { type ObservationForm, type FormApiResponse, type ApiNameTranslation, type FormPrivilege, type ApiFormPrivilege, type FormMetadata, type FormMetadataApiResponse, type FormResource, type ComplexValue, type ObservationFormTranslations, } from './models';
|
|
1
|
+
export { fetchObservationForms, fetchFormMetadata, getPatientFormData, } from './observationFormsService';
|
|
2
|
+
export { type ObservationForm, type FormApiResponse, type ApiNameTranslation, type FormPrivilege, type ApiFormPrivilege, type FormMetadata, type FormMetadataApiResponse, type FormResource, type ComplexValue, type ObservationFormTranslations, type FormResponseData, type FormProvider, } from './models';
|
|
3
3
|
export { transformFormDataToObservations, transformObservationsToFormData, type FormData, type FormControlData, type Form2Observation, type ConceptValue, } from './observationFormsTransformer';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/observationFormsService/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,iBAAiB,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/observationFormsService/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,KAAK,eAAe,EACpB,KAAK,eAAe,EACpB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,YAAY,EACjB,KAAK,uBAAuB,EAC5B,KAAK,YAAY,EACjB,KAAK,YAAY,EACjB,KAAK,2BAA2B,EAChC,KAAK,gBAAgB,EACrB,KAAK,YAAY,GAClB,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,+BAA+B,EAC/B,+BAA+B,EAC/B,KAAK,QAAQ,EACb,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,YAAY,GAClB,MAAM,+BAA+B,CAAC"}
|
|
@@ -68,4 +68,18 @@ export interface ComplexValue {
|
|
|
68
68
|
contentType?: string;
|
|
69
69
|
[key: string]: unknown;
|
|
70
70
|
}
|
|
71
|
+
export interface FormProvider {
|
|
72
|
+
providerName: string;
|
|
73
|
+
uuid: string;
|
|
74
|
+
}
|
|
75
|
+
export interface FormResponseData {
|
|
76
|
+
formType: string;
|
|
77
|
+
formName: string;
|
|
78
|
+
formVersion: number;
|
|
79
|
+
visitUuid: string;
|
|
80
|
+
visitStartDateTime: number;
|
|
81
|
+
encounterUuid: string;
|
|
82
|
+
encounterDateTime: number;
|
|
83
|
+
providers: FormProvider[];
|
|
84
|
+
}
|
|
71
85
|
//# sourceMappingURL=models.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/observationFormsService/models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAEtD,YAAY,EAAE,2BAA2B,EAAE,MAAM,SAAS,CAAC;AAE3D,MAAM,WAAW,aAAa;IAC5B,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAGD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,aAAa,EAAE,CAAC;CAC7B;AAGD,MAAM,WAAW,gBAAgB;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,gBAAgB,EAAE,CAAC;IAC/B,eAAe,EAAE,MAAM,CAAC;CACzB;AAGD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,OAAO,CAAC;IACn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EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,YAAY,GAAG,YAAY,GAAG,IAAI,CAAC;IACtE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAClC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAGD,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAGD,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAID,MAAM,WAAW,YAAY;IAC3B,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,YAAY,EAAE,CAAC;CAC3B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ObservationForm, FormMetadata } from './models';
|
|
1
|
+
import { ObservationForm, FormMetadata, FormResponseData } from './models';
|
|
2
2
|
/**
|
|
3
3
|
* Function to fetch and process observation forms
|
|
4
4
|
*/
|
|
@@ -9,4 +9,12 @@ export declare const fetchObservationForms: () => Promise<ObservationForm[]>;
|
|
|
9
9
|
* @returns Promise resolving to parsed form metadata with translations for current locale
|
|
10
10
|
*/
|
|
11
11
|
export declare const fetchFormMetadata: (formUuid: string) => Promise<FormMetadata>;
|
|
12
|
+
/**
|
|
13
|
+
* Fetches patient form data for a given patient
|
|
14
|
+
* @param patientUuid - The UUID of the patient
|
|
15
|
+
* @param numberOfVisits - Optional number of visits to fetch form data for
|
|
16
|
+
* @returns Promise resolving to an array of form response data
|
|
17
|
+
* @throws Error if the patient UUID is invalid or the request fails
|
|
18
|
+
*/
|
|
19
|
+
export declare const getPatientFormData: (patientUuid: string, episodeUuids?: string[], numberOfVisits?: number) => Promise<FormResponseData[]>;
|
|
12
20
|
//# sourceMappingURL=observationFormsService.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"observationFormsService.d.ts","sourceRoot":"","sources":["../../src/observationFormsService/observationFormsService.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"observationFormsService.d.ts","sourceRoot":"","sources":["../../src/observationFormsService/observationFormsService.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,eAAe,EAGf,YAAY,EAEZ,gBAAgB,EACjB,MAAM,UAAU,CAAC;AA6DlB;;GAEG;AACH,eAAO,MAAM,qBAAqB,QAAa,OAAO,CAAC,eAAe,EAAE,CAOvE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAC5B,UAAU,MAAM,KACf,OAAO,CAAC,YAAY,CA4DtB,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,GAC7B,aAAa,MAAM,EACnB,eAAe,MAAM,EAAE,EACvB,iBAAiB,MAAM,KACtB,OAAO,CAAC,gBAAgB,EAAE,CAgB5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/patientService/constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,C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