Changelog for the openmrs adaptor
@openfn/language-openmrs
5.0.3 - 14 June 2025
Patch Changes
- be854ec: Fix an issue where upsert will wrongly trigger creation of an existing item
- 59251d5: Fix an issue where upsert will create to the wrong URL if there is no UUID in the path
5.0.2 - 22 April 2025
Patch Changes
- 99e4b48: - Better handling of HTML content in http requests
- When logging HTTP requests, include query parameters
- Updated dependencies [99e4b48]
- Updated dependencies [13bf08f]
- @openfn/language-common@2.4.0
5.0.1 - 16 April 2025
Patch Changes
- Updated dependencies [b089c56]
- @openfn/language-common@2.3.3
5.0.0 - 11 April 2025
Major re-write of the OpenMRS API. Cleaned up the main namespace with a shorter,
cleaner API and automatic pagination on get()
.
Major Changes
- Signatures changed for
get()
,update()
,upsert()
, andcreate()
- Removed
getEncounter()
,getEncounters()
,getPatient()
,searchPatient()
andpost()
andsearchPerson()
- Added automatic pagination to
get()
- Removed
response
(and http semantics generally) fromget()
, - Remove all callbacks
Minor Changes
- Added new
destroy()
function (for delete) - Documentation improvements
Patch Changes
- Updated dependencies [d7105c0]
- @openfn/language-common@2.3.2
Migration Guide
Signatures have all changed for the main OpenMRS rest functions get()
,
update()
, upsert()
, and create()
. Generally they take the form
verb(path, [data], [options])
.
All removed getters (ie, getPatient()
) are replaced by the
get(path, options)
function introduced in 4.10.0
. Just pass a path to the
resource you need, and add a { query }
options object to search.
For example:
- Instead of
getEncounters()
, doget('encounters')
- Instead of
getEncounter('1234')
, doget('encounters/1234')
- Instead of
searchPatient({ query: 'sarah' })
, doget('patient', { query: 'sarah' })
- Instead of callback arguments, you can either use
.then()
:
get('encounter/1234', state => {
// the fetched resource is on state.data
return state;
});
Or use an fn block:
get('encounter/1234');
fn(state => {
// the fetched resource is on state.data
return state;
});
4.4.0 - 14 March 2025
Minor Changes
- 23ccb01: Allow errors to be passed to the http helpers. This overrides the behaviour to throw if an error code is returned
Patch Changes
- Updated dependencies [23ccb01]
- @openfn/language-common@2.3.1
4.3.0 - 28 January 2025
Minor Changes
-
909d81f: Added
http.post()
,http.delete()
andhttp.get()
.removed the undocumented callback in
http.request()
.
4.2.0 - 20 January 2025
Minor Changes
- 5d6839e: Implement namespaced http.request() function. The function makes a
call against the
instanceUrl
and the path provided, while allowing manipulation to the API call as needed.