Skip to main content

Changelog for the openmrs adaptor

@openfn/language-openmrs

5.0.1 - 16 April 2025

Patch Changes

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(), and create()
  • Removed getEncounter(), getEncounters(), getPatient(), searchPatient() and post() and searchPerson()
  • Added automatic pagination to get()
  • Removed response (and http semantics generally) from get(),
  • Remove all callbacks

Minor Changes

  • Added new destroy() function (for delete)
  • Documentation improvements

Patch Changes

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() , do get('encounters')
  • Instead of getEncounter('1234'), do get('encounters/1234')
  • Instead of searchPatient({ query: 'sarah' }), do get('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

4.3.0 - 28 January 2025

Minor Changes

  • 909d81f: Added http.post(), http.delete() and http.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.

4.1.6 - 16 January 2025

Patch Changes

  • Updated dependencies [b3d7f59]
  • Updated dependencies [2d709ff]
  • Updated dependencies [41e8cc3]

4.1.5 - 16 January 2025

Patch Changes

4.1.4 - 09 January 2025

Patch Changes

4.1.3 - 28 October 2024

Patch Changes

4.1.2 - 18 October 2024

Patch Changes

4.1.1 - 15 October 2024

Patch Changes

4.1.0 - 09 October 2024

Minor Changes

  • 1227829: Add fhir.get() function

4.0.2 - 03 October 2024

Patch Changes

  • b1c48c7: improve upsert operation

4.0.1 - 24 September 2024

Patch Changes

4.0.0 - 12 September 2024

Major Changes

  • Remove createEncounter and createPatient functions
  • Add pagination support on request helper function

Minor Changes

  • c8dbd21: Add cursor and dateFns helper 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:

create('encounter', $.encounter);

To create a new patient, you can use the following code:

create('patient', $.patient);

3.1.4 - 16 August 2024

Patch Changes

3.1.3 - 01 August 2024

Patch Changes

3.1.2 - 25 July 2024

Patch Changes

  • 73d0a02: Make documentation public
  • Updated dependencies [4c08444]
  • Updated dependencies [73d0a02]

3.1.1 - 19 June 2024

Patch Changes

3.1.0 - 13 June 2024

Minor Changes

  • 73433c20: Add fnIf operation

Patch Changes

3.0.6 - 11 June 2024

Patch Changes

3.0.5 - 21 May 2024

Patch Changes

3.0.4 - 08 May 2024

Patch Changes

3.0.3 - 08 May 2024

Patch Changes

3.0.2 - 12 April 2024

Patch Changes

3.0.1 - 12 April 2024

Patch Changes

3.0.0 - 03 April 2024

Major Changes

  • cadff13b: - Remove superagent dependency.
    • Rebase on new common http request helper.
    • Remove login function as no longer needed.
    • Update log output

2.0.8 - 20 September 2023

Patch Changes

2.0.7 - 08 September 2023

Patch Changes

2.0.6 - 14 August 2023

Patch Changes

2.0.5 - 14 July 2023

Patch Changes

2.0.4 - 14 July 2023

Patch Changes

2.0.3 - 30 June 2023

Patch Changes

2.0.2 - 23 June 2023

Patch Changes

2.0.1 - 19 June 2023

Patch Changes

2.0.0

Major Changes

  • 2c1d603: Remove parameter reassignment to ensure proper functioning inside an each block; add eslint

    The packages receiving a major bump here exposed functions that didn't work as expected inside each blocks. Users were previously wrapping these functions inside their own custom fn blocks, and this change will ensure that they can be used inside a standard each.

    See https://github.com/OpenFn/adaptors/issues/275 for more details.

Patch Changes

1.1.1 - 15 June 2023

Patch Changes

  • 2390129: - replace throw new Error with console.log
    • improve Log function

1.1.0 - 10 June 2023

Minor Changes

  • d124f67: - Add create, update and upsert function
    • Add callback support and improve examples for
      • get()
      • post()
      • getPatient()
      • searchPerson()
      • getEncounter()
      • searchPatient()
      • createPatient()
      • getEncounters()
      • createEncounter()

1.0.1 - 31 May 2023

Patch Changes

  • 97cc7ce: - Fix checking for empty response
    • Style logs output

1.0.0 - 30 May 2023

Major Changes

  • b6478c0: - Removed request in favour of superagent
    • Improve error handling
    • Moved login to execute function
    • Added
      • createPatient
      • searchPatient
      • searchPerson
      • getEncounters
      • getEncounter
      • get
      • post

0.10.5 - 31 March 2023

Patch Changes

0.10.4 - 30 March 2023

Patch Changes

0.10.3 - 15 February 2023

Patch Changes

  • f7ebd3c: remove sample configuration

0.10.2 - 15 February 2023

Patch Changes

  • f2aed32: add examples

0.10.1 - 13 January 2023

Patch Changes

  • 6d8de03: change @constructor to @function and remove /*_ @module Adaptor _/

0.10.0 - 25 November 2022

Minor Changes

  • 6786949: Migrate OpenMRS