Skip to main content

Share patient share

This is an API will be invoked from the <b>PHR-HIU</b> to share the user/patient profile with HMIS/LIMS.

POST/api/hiecm/patient-share/v3/share

<ol type='1'> <li> <b>Header</b> <ol type='a'> <br/> <li>Authorisation will be provided by the gateway session API after the successful verification of client ID and Secret [ Example: <TOKEN> ]</li> <li>REQUEST-ID unique UUID[ Example: 18235d89-cb13-479d-ad71-7a57d5f669a8 ]</li> <li>TIMESTAMP actual time of the requested was initiated[ Example: 2022-10-06T10:10:00.587Z ]</li> <li>X-AUTH-TOKEN JWT Authentication token which was issued by ABDM after successful validation of username and password[ Example: <TOKEN> ]</li> <li>X-CM-ID consent manager ID[ Example: sbx ]</li> <li>X-HIU-ID HIU ID[ Example: HIU ]</li> </ol> </li> <br/> <li> <b>Request Body</b> <ol type='a'><br/> <li>intent This is a key value pair which contains the purpose [ Example: {purpose: PROFILE_SHARE } ]</li> <li>metaData This is a key value pair which contains the location longitude and latitude[ Example: {HIP_ID: ABDM_HIP, context: 123, lat: 20.5937 long: 78.9629} ]</li> <li>profile which contains user details.</li> </ol> </ol>

Authorizations

Authorizationbearer tokenRequired

The access token from POST /api/hiecm/gateway/v3/sessions.

Headers

REQUEST-IDstringRequired

Unique UUID for track the end to end request transaction

TIMESTAMPstringRequired

Actual time of the request was initiated, ISO 8601 represents date and time by starting with the year, followed by the month, the day, the hour, the minutes, seconds and milliseconds

X-CM-IDstringRequired

Suffix of the consent manager to which the request was intended

X-HIU-IDstringRequired

Identifier of the health information user to which the request was intended

X-AUTH-TOKENstringRequired

JWT Authentication token which was issued by ABDM after successful validation of username and password

Body

intentstringRequired

The intention of share API call

One of PROFILE_SHARERECORD_SHAREPAYMENT_SHARE

metaDataobjectRequired

A key-value pair carrying the location longitude and latitude.

metaData.hipIdstringRequired

The service ID of the health information provider. Allows alpha numeric character and special characters like [A-Z a-z 0-9]+[A-Z a-z 0-9 @//_//-]*[A-Z a-z 0-9]

metaData.contextstringRequired

This is a counter Id. Allows alpha numeric character and special characters like ^(?:[a-zA-Z0-9 ]|[a-zA-Z0-9 ][a-zA-Z0-9.\\-_ ]*[a-zA-Z0-9 ]){1,250}$

metaData.hprIdstring

Healthcare Professionals Registry id. Allows alpha numeric character and special characters like [a-zA-Z0-9][a-zA-Z0-9_.]+[a-zA-Z0-9]@(dr.abdm|hpr.abdm)$|^[1-9][0-9]{13}$

metaData.latitudenumberRequired

The latitude of the location.Allows alpha numeric character and special characters like ^[0-9-.]+$

metaData.longitudenumberRequired

The longitude of the location.Allows alpha numeric character and special characters like ^[0-9-.]+$

profileobjectRequired

This should populated only for PROFILE_SHARE

profile.patientobjectRequired
profile.patient.abhaNumberstring

The abha number of the patient. Should be only 14 digit. Allows alpha numeric character and special characters like ^(\\d+-?){13}\\d$

profile.patient.abhaAddressstringRequired

The abha address of the patient. Should start with Alphanumeric . and _ in the middle and must be ending with @abdm or @sbx and Allows alpha numeric character and special characters like ^[a-zA-Z0-9][a-zA-Z0-9_.\-!]+[a-zA-Z0-9]@(abdm|sbx)$

profile.patient.namestringRequired

The name of the patient. Allows alpha numeric character and special characters like ^[a-zA-Z0-9.-_,]+(([',. -][a-zA-Z0-9. ])?[a-zA-Z0-9. ]*)*$

profile.patient.genderstringRequired

The gender of the patient

One of MFODTU

profile.patient.dayOfBirthstring

The day of birth of the patient. Only allows numeric values between 1 abd 31 and ^(?!\\s*$)(0?[1-9]|[12][0-9]|3[01])$

profile.patient.monthOfBirthstring

The month of birth of the patient. Only allows numeric values between 1 abd 12 and ^(?!\\s*$)(0?[1-9]|[1][0-2])$

profile.patient.yearOfBirthstringRequired

The month of birth of the patient. Only allows numeric values and must be 4 digit ranging between 1900 and 2200 and ^(?!\\s*$)(19|20|21|22)\\d{2}$

profile.patient.addressobjectRequired
profile.patient.address.linestringRequired

The address line

profile.patient.address.districtstring

The district and should only contain alphabets

profile.patient.address.statestring

The state and should only contain alphabets like [A-Z a-z]+[A-Z a-z //' ']*$

profile.patient.address.pincodestring

Should be 5 digits and only contain numbers

profile.patient.phoneNumberstringRequired

The mobile number of the patient. Must be 10 digit and contain only 0-9 and it allows only numbers like ^(\+\d{1,3}[- ]?)?\d{10}$

Responses

401

Unauthorized

Everything returns 401

408

Request Timeout

Error codes for this module

429

Too Many Requests

Error codes for this module

500

Internal Server Error

Error codes for this module

503

Service Unavailable

Error codes for this module