RESTWS: REST endpoint for primary and extra patient identifier types

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?

And this?

Thank you @dkayiwa

Did you mean:

@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.