openhie / mhero-synch

mHERO Synchtonization Coordinator (IL adapter)
Apache License 2.0
1 stars 1 forks source link

IDs of created contacts should be stored back in the ILR #2

Open litlfred opened 10 years ago

litlfred commented 10 years ago

When a new contact is created in rapidpro, the ID of the created contact should be stored back in the interlinked-registry.

Two things are needed for this:

Submission looks like this:

  <csd:otherID assigningAuthorityName="2.25.1098910207106778371035457739371181056504702027035" code="1">22-02-103-0012</csd:otherID>

the @assigningAuthorityName and @code attributes to use.

litlfred commented 10 years ago

You have some flexibility in how to store the contact ids. The issue give the example: <csd:otherID assigningAuthorityName="2.25.1098910207106778371035457739371181056504702027035" code="1">22-02-103-0012</csd:otherID> You could also do something like: <csd:otherID assigningAuthorityName="https://rapidpro.io//org/choose/?organization=70" code=“contact_id'>urn:uuid:d7a95800-4af5-11e4-8cf7-0002a5d5c51b&t;/csd:otherID> to indicate that this contact was made for a particular workflow. The text content of the <csd:otherID/> element should be the value of the identifier. You don’t need the urn:uuid above — just use whatever is easier to link back to RapidPRO.

litlfred commented 10 years ago

A complete request would be:

`
<?xml version="1.0" encoding="utf-8"?>

urn:uuid:d7a95800-4af5-11e4-8cf7-0002a5d5c51b `
If you need to update the contact ID, there is a stored function with similar parameters named 'csd_hwru:health_worker_create_otherid' Note: I think the urn's used are invalid according to URN rules and we should probably fix them at some point. See https://github.com/openhie/openinfoman-hwr/issues/1
litlfred commented 10 years ago

You submit the above document as a post to: <BASE_URI>/CSD/csr/<NAME>/careServicesRequest/update where is the name of the CSD document you wish to reference