Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com

How to add consent status mapping for HL7 message?

Goal:

Adding a mapping for consent status that is added by HL7 message.

Pre-requisite:

  • Knowledge of HL7 plugin workflow.

  • Knowledge of HL7 message structure.

  • Knowledge of JSON.

  • Consent status mapping chart.

Steps:

  • Create consent statements as per the given chart. There can be multiple consent statuses. Every consent status will have different statement values. The chart should be as follows:

OpenSpecimen Field Consent Tier Questions

OS Value

<Consent statement>

<value among Yes/No/None>

 

  • Add those consent statements in the CP which has a workflow of two-step participant registration.

  • Go to the Openspecimen settings → System Workflows, and download the existing JSON file of the system workflow.

  • Add JSON object like below at the end of the JSON array in the workflow file. Replace the placeholders with the required values like CP id, consent codes. etc.

    { { "name": "external-consents", "data": { "cpId": <CP id>, "docType": "Cnst Rsch", "response-mapping": { "<Status 1>": { "<Consent code 1>": "<values Not Specified/Yes/No>", "<Consent code 2>": "<values Not Specified/Yes/No>", . . . "<Consent code n>": "<values Not Specified/Yes/No>" }, . . . "Status n": { "<Consent code 1>": "<values Not Specified/Yes/No>", "<Consent code 2>": "<values Not Specified/Yes/No>", . . . "<Consent code n>": "<values Not Specified/Yes/No>" } } } } }
  • Set the modified system workflow JSON file in Openspecimen.

  • First, lookup for the participant and register the participant to the CP. Then, sent the HL7 message having a CON segment for the same participant.

  • Refresh the Openspecimen and check the participant’s consent status.

Example:

Below is an example to add the mapping for consent status. There are four statuses as signed, declined, limited, and full. We will add mappings for these four statuses.

  • Here is the consent status mapping chart.

  • Add the consent statements in Openspecimen as below:

  • Download the existing system workflow file and add the consent mapping JSON at the end of the file. Below is the modified system workflow file.

  • Set the modified system workflow JSON file in Openspecimen.

  • Now. go inside the CP in which you have set up two-step participant registration. First, look up the participant and register the participant. After registration, send the HL7 message to add the consent to the registered participant. The HL7 message with the CON segment:

    MSH|^~\&|EPIC||OpenSpecimen|UTSW|20210212100815|S165581|ADT^A08|132007|T|2.3 PID|1||<MRN>^^^^<Site>||<Last name>^<First name>||<Birht date>|<Gender>||<Race>||||||||||||<Ethinicity> CON|1|Cnst Rsch|||||||||<Status Signed/Declined/Full/Limited>||<Consent date>
  • Now, see the participant's consent status.

Got feedback or spotted a mistake?

Leave a comment at the end of this page or email contact@krishagni.com