Skip to main content

Patient Assign Permanent MRN Operation

Draft

This is draft documentation for proposed functionality.

OPERATION: POST [base]/Patient/$assign-mrn

The Patient Assign Permanent MRN operation is used with the myAvatar CareRecord to assign a permanent medical record number (MRN) to a Call Intake Patient.

The operation is designed to follow the pattern of the Patient Merge operation.

Workflow

This extended operation is part of a larger workflow supporting the transition of myAvatar Call Intake Patients to standard Patients (with permanent MRNs).

Authorization

This operation will require the application obtain authorization to update a Patient using one of the following SMART clinical scopes.

  • v1: [patient|user|system]/Patient.[write|*]
  • v2: [patient|user|system]/Patient.[u] (future)

Parameters

UseNameCardinalityTypeDocumentation
INsource-patient1..1ReferenceThe current temporary ID assigned to a Call Intake Patient.
INtarget-patient0..1ReferenceThe desired permanent ID to assign to a Call Intake Patient.
If excluded a permanent ID will be auto-assigned.
OUTresult-patient0..1ReferenceThe resulting permanent ID assigned to a Call Intake Patient.
If target-patient supplied these will match.
OUToutcome1..1OperationOutcomeThe outcome of the operation. On success this will provide a success statement or warnings related to the change. If the operation was unsuccessful, the OperationOutcome will include the reason for the failure.

Examples

curl -X POST 'https://fhir.netsmartcloud.com/v4/Patient/$assign-mrn' \
-H "Authorization: {Bearer Token}" \
-H "Accept: application/fhir+json" \
-H "Content-Type: application/x-form-urlencoded" \
-d @payload.json

Payloads

Sample Assign Permanent MRN Payload

{
"resourceType": "Parameters",
"parameter": [
{
"name": "source-patient",
"valueReference": {
"reference": "Patient/1"
}
},
// optional: a permanent MRN will be auto-assigned if not set
{
"name": "target-patient",
"valueReference": {
"reference": "Patient/2"
}
}
]
}

Sample Assign Permanent MRN Response Payloads

Assign Permanent MRN Success
{
"resourceType": "Parameters",
"parameter": [
{
"name": "source-patient",
"valueReference": {
"reference": "Patient/1"
}
},
// if provided
{
"name": "target-patient",
"valueReference": {
"reference": "Patient/2"
}
},
// outcome of request
{
"name": "result-patient",
"valueReference": {
"reference": "Patient/2"
}
},
{
"name": "outcome",
"resource": {
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "information",
"code": "informational",
"details": {
"text": "Success message"
}
}
]
}
}
]
}
Invalid Assign Permanent MRN Payload or Other Unprocessable Request
{
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "processing",
"details": {
"text": "Exception message"
}
}
]
}
Rejections or Other Assign Permanent MRN Processing Errors
{
"resourceType": "Parameters",
"parameter": [
{
"name": "source-patient",
"valueReference": {
"reference": "Patient/1"
}
},
{
"name": "target-patient",
"valueReference": {
"reference": "Patient/2"
}
},
{
"name": "preview",
"valueBoolean": false
},
{
"name": "outcome",
"resource": {
"resourceType": "OperationOutcome",
"issue": [
{
"severity": "error",
"code": "processing",
"details": {
"text": "status note"
}
}
]
}
}
]
}

Errors

Errors will be reported within an OperationOutcome and could include:

IssueDescriptionHTTP Status
T.B.D.The Source Patient was not found based on the provided parameters.400 Bad Request
T.B.D.The Source Patient has already been assigned a permanent MRN.400 Bad Request
T.B.D.The Target Patient ID was not accepted. E.g., unsupported value or syntax.400 Bad Request