RESTWS: REST endpoint for primary and extra patient identifier types

Tags: #<Tag:0x00007f0f16d4b6e8> #<Tag:0x00007f0f16d4b558> #<Tag:0x00007f0f16d4b3c8>

Hi all,

I’m working on MF-217-(Adding support for recording of patient identifiers to openmrs-esm-patient-registration). We however require two or more endpoints ie:-

  • An endpoint to fetch the primary patient identifier type(I think this is normally one, correct me if I’m wrong)
  • An end point to fetch the extra patient identifier types(Secondary identifier types)

In the Reference Application, this configuration has been managed by the EMR API module and we suggest it would be the safest place to have those endpoint. But our question is, is there any one that knows of similar endpoints living somewhere?

Are you looking for this? https://qa-refapp.openmrs.org/openmrs/ws/rest/v1/metadatamapping/termmapping?code=emr.primaryIdentifierType

And this? http://qa-refapp.openmrs.org/openmrs/ws/rest/v1/metadatamapping/termmapping/62df45de-306f-4e3f-b297-0c9ceed94ec9

Thank you @dkayiwa

Did you mean: https://qa-refapp.openmrs.org/openmrs/ws/rest/v1/metadatamapping/termmapping/5d86f391-f65e-45e0-bb77-5b3462ae769f

@dkayiwa this helps in fetching the Primary Identifier Type.

Does anyone know of a similar endpoint for fetching the secondary identifier types? If not, what’s the positive way forward, adding a handler for code=emr.secondaryIdentifierType(s) to the metadata mapping resource?

/cc: @mksd, @mogoodrich, @ibacher

@samuel34 your question is equivalent to this. We have an end point for fetching a patient with id 1. Can we add an end point for fetching a patient with id 2?

Aaahh I see, nice catch :stuck_out_tongue_closed_eyes:

To make my question or suggestion clear: I think we want to add some metadata mapping with code = emr.secondaryIdentifierTypes. So I can assert that the endpoint exists but the data doesn’t. We need to agree on the naming and standardisation of such a configuration.

No all implementations use it. So you will add it only if you have a use case for it.

If you just want to test, then add a row in the metadatamapping_metadata_term_mapping table.

1 Like

Actually @mksd and @dkayiwa pointed us to the right code for extra patient identifier types. It should be: emr.extraPatientIdentifierTypes .

This way, you can fetch the primary identifier type and extra(secondary) identifier types within two async calls.

1 Like