-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #749 from OpenFn/747-cleanup
`openmrs` remove createEncounter and createPatient
- Loading branch information
Showing
5 changed files
with
164 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,23 @@ | ||
--- | ||
'@openfn/language-openmrs': minor | ||
'@openfn/language-openmrs': major | ||
--- | ||
|
||
- Add pagination support on request helper function | ||
- Remove `createEncounter` and `createPatient` functions | ||
|
||
### Migration Guide | ||
|
||
The `createEncounter` and `createPatient` functions have been removed from the | ||
OpenMRS adaptor. Use the `create` function with the appropriate resource type. | ||
|
||
To create a new encounter, you can use the following code: | ||
|
||
```js | ||
create('encounter', $.encounter); | ||
``` | ||
|
||
To create a new patient, you can use the following code: | ||
|
||
```js | ||
create('patient', $.patient); | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
{ | ||
"patient": { | ||
"identifiers": [ | ||
{ | ||
"identifier": "4023287", | ||
"identifierType": "05a29f94-c0ed-11e2-94be-8c13b969e334", | ||
"preferred": true | ||
} | ||
], | ||
"person": { | ||
"gender": "M", | ||
"age": 42, | ||
"birthdate": "1970-01-01T00:00:00.000+0100", | ||
"birthdateEstimated": false, | ||
"names": [ | ||
{ | ||
"givenName": "Doe", | ||
"familyName": "John" | ||
} | ||
] | ||
} | ||
}, | ||
"encounter": { | ||
"patient": "1fdaa696-e759-4a7d-a066-f1ae557c151b", | ||
"encounterDatetime": "2023-05-25T06:08:25.000+0000", | ||
"encounterType": "dd528487-82a5-4082-9c72-ed246bd49591", | ||
"location": "ba685651-ed3b-4e63-9b35-78893060758a", | ||
"encounterProviders": [], | ||
"visit": { | ||
"patient": "1fdaa696-e759-4a7d-a066-f1ae557c151b", | ||
"visitType": "7b0f5697-27e3-40c4-8bae-f4049abfb4ed", | ||
"startDatetime": "2023-05-25T06:08:25.000+0000", | ||
"stopDatetime": "2023-05-25T06:09:25.000+0000" | ||
} | ||
} | ||
} |
Oops, something went wrong.