@openmrs/esm-api 6.2.1-pre.2777 → 6.2.1-pre.2779

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.
@@ -2,7 +2,7 @@ Browserslist: caniuse-lite is outdated. Please run:
2
2
  npx update-browserslist-db@latest
3
3
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
4
4
  asset openmrs-esm-api.js 55.3 KiB [emitted] [minimized] (name: main) 2 related assets
5
- orphan modules 1.02 MiB [orphan] 869 modules
5
+ orphan modules 1.02 MiB [orphan] 872 modules
6
6
  runtime modules 670 bytes 3 modules
7
7
  built modules 144 KiB [built]
8
8
  modules by path external "@openmrs/ 168 bytes
@@ -13,4 +13,4 @@ built modules 144 KiB [built]
13
13
  cacheable modules 144 KiB
14
14
  ./src/index.ts + 51 modules 136 KiB [built] [code generated]
15
15
  ../esm-state/dist/openmrs-esm-state.js 8.12 KiB [built] [code generated]
16
- webpack 5.88.0 compiled successfully in 4622 ms
16
+ webpack 5.88.0 compiled successfully in 4563 ms
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openmrs/esm-api",
3
- "version": "6.2.1-pre.2777",
3
+ "version": "6.2.1-pre.2779",
4
4
  "license": "MPL-2.0",
5
5
  "description": "The javascript module for interacting with the OpenMRS API",
6
6
  "browser": "dist/openmrs-esm-api.js",
@@ -48,10 +48,10 @@
48
48
  "@openmrs/esm-offline": "6.x"
49
49
  },
50
50
  "devDependencies": {
51
- "@openmrs/esm-config": "6.2.1-pre.2777",
52
- "@openmrs/esm-error-handling": "6.2.1-pre.2777",
53
- "@openmrs/esm-navigation": "6.2.1-pre.2777",
54
- "@openmrs/esm-state": "6.2.1-pre.2777",
51
+ "@openmrs/esm-config": "6.2.1-pre.2779",
52
+ "@openmrs/esm-error-handling": "6.2.1-pre.2779",
53
+ "@openmrs/esm-navigation": "6.2.1-pre.2779",
54
+ "@openmrs/esm-state": "6.2.1-pre.2779",
55
55
  "rxjs": "^6.5.3",
56
56
  "webpack": "^5.88.0"
57
57
  },
@@ -1,5 +1,14 @@
1
- import { type OpenmrsResource } from './openmrs-resource';
1
+ import { type OpenmrsResourceStrict, type OpenmrsResource } from './openmrs-resource';
2
2
 
3
- export interface Concept extends OpenmrsResource {
4
- // TODO: add more fields
3
+ export interface Concept extends OpenmrsResourceStrict {
4
+ name?: string;
5
+ locale?: string;
6
+ localPreferred?: boolean;
7
+ conceptNameType?: 'FULLY_SPECIFIED' | 'SHORT' | 'INDEX_TERM';
8
+ }
9
+
10
+ export interface ConceptClass extends OpenmrsResourceStrict {
11
+ name?: string;
12
+ description?: string;
13
+ retired?: boolean;
5
14
  }
@@ -0,0 +1,23 @@
1
+ import { type Concept, type ConceptClass } from './concept-resource';
2
+ import { type Encounter } from './encounter-resource';
3
+ import { type OpenmrsResource, type OpenmrsResourceStrict } from './openmrs-resource';
4
+ import { type Patient } from './patient-resource';
5
+
6
+ export interface Diagnosis extends OpenmrsResourceStrict {
7
+ diagnosis?: {
8
+ coded?: {
9
+ uuid: string;
10
+ display?: string;
11
+ name: Concept;
12
+ datatype: OpenmrsResource;
13
+ conceptClass: ConceptClass;
14
+ };
15
+ nonCoded?: string;
16
+ };
17
+ patient?: Patient;
18
+ encounter?: Encounter;
19
+ certainty?: string;
20
+ rank?: number;
21
+ formFieldNamespace?: string;
22
+ formFieldPath?: string;
23
+ }
@@ -0,0 +1,34 @@
1
+ import { type OpenmrsResource, type OpenmrsResourceStrict } from './openmrs-resource';
2
+ import { type Patient } from './patient-resource';
3
+ import { type Location } from './location-resource';
4
+ import { type Visit } from './visit-resource';
5
+ import { type Diagnosis } from './diagnosis-resource';
6
+ import { type Obs } from './obs-resource';
7
+
8
+ export interface Encounter extends OpenmrsResourceStrict {
9
+ encounterDateTime?: string;
10
+ patient?: Patient;
11
+ location?: Location;
12
+ encounterType?: EncounterType;
13
+ obs?: Array<Obs>;
14
+ visit?: Visit;
15
+ encounterProviders?: Array<OpenmrsResource>;
16
+ diagnoses?: Array<Diagnosis>;
17
+ }
18
+
19
+ export interface EncounterType extends OpenmrsResourceStrict {
20
+ name: string;
21
+ description: string;
22
+ retired: boolean;
23
+ }
24
+
25
+ export interface EncounterProvider extends OpenmrsResourceStrict {
26
+ provider: OpenmrsResource;
27
+ encounterRole: EncounterRole;
28
+ }
29
+
30
+ export interface EncounterRole extends OpenmrsResourceStrict {
31
+ name: string;
32
+ description: string;
33
+ retired: boolean;
34
+ }
@@ -1,7 +1,10 @@
1
1
  export * from './attachments-types';
2
2
  export * from './concept-resource';
3
+ export * from './diagnosis-resource';
4
+ export * from './encounter-resource';
3
5
  export * from './fetch';
4
6
  export * from './fhir-resource';
7
+ export * from './obs-resource';
5
8
  export * from './openmrs-resource';
6
9
  export * from './user-resource';
7
10
  export * from './patient-resource';
@@ -1,3 +1,37 @@
1
+ import { type OpenmrsResource, type OpenmrsResourceStrict } from './openmrs-resource';
2
+
3
+ export interface Location extends OpenmrsResourceStrict {
4
+ name?: string;
5
+ description?: string;
6
+ cityVillage?: string;
7
+ stateProvince?: string;
8
+ country?: string;
9
+ postalCode?: string;
10
+ countyDistrict?: string;
11
+ latitude?: string;
12
+ longitude?: string;
13
+ address1?: string;
14
+ address2?: string;
15
+ address3?: string;
16
+ address4?: string;
17
+ address5?: string;
18
+ address6?: string;
19
+ address7?: string;
20
+ address8?: string;
21
+ address9?: string;
22
+ address10?: string;
23
+ address11?: string;
24
+ address12?: string;
25
+ address13?: string;
26
+ address14?: string;
27
+ address15?: string;
28
+ tags?: Array<OpenmrsResource>;
29
+ attributes?: Array<OpenmrsResource>;
30
+ parentLocation?: Location;
31
+ childLocation?: Location;
32
+ retired?: boolean;
33
+ }
34
+
1
35
  export interface FHIRLocationResource {
2
36
  resource: {
3
37
  id: string;
@@ -0,0 +1,25 @@
1
+ import { type Concept } from './concept-resource';
2
+ import { type Encounter } from './encounter-resource';
3
+ import { type Location } from './location-resource';
4
+ import { type OpenmrsResource, type OpenmrsResourceStrict } from './openmrs-resource';
5
+ import { type Person } from './person-resource';
6
+
7
+ export interface Obs extends OpenmrsResourceStrict {
8
+ concept?: Concept;
9
+ person?: Person;
10
+ obsDatetime?: string;
11
+ accessionNumber?: string;
12
+ obsGroup?: Obs;
13
+ valueCodedName?: OpenmrsResource;
14
+ groupMembers?: Array<Obs>;
15
+ comment?: string;
16
+ location?: Location;
17
+ order?: OpenmrsResource;
18
+ encounter?: Encounter;
19
+ value?: number | string | boolean | OpenmrsResource;
20
+ valueModifier?: string;
21
+ formFilePath?: string;
22
+ formFiledNamespace?: string;
23
+ status?: 'PRELIMINARY' | 'FINAL' | 'AMENDED';
24
+ interpretation?: string;
25
+ }
@@ -1,4 +1,6 @@
1
+ import { type Encounter } from './encounter-resource';
1
2
  import type { OpenmrsResource } from './openmrs-resource';
3
+ import { type Patient } from './patient-resource';
2
4
 
3
5
  export interface NewVisitPayload {
4
6
  uuid?: string;
@@ -18,8 +20,8 @@ export type UpdateVisitPayload = Partial<NewVisitPayload> & {};
18
20
  export interface Visit {
19
21
  uuid: string;
20
22
  display?: string;
21
- encounters: Array<OpenmrsResource>;
22
- patient?: OpenmrsResource;
23
+ encounters?: Array<Encounter>;
24
+ patient?: Patient;
23
25
  visitType: VisitType;
24
26
  location?: Location;
25
27
  startDatetime: string;