Skip to content

Discussion: Error messages as to why a DiagnosticReport POST has failed #163

Description

@kujo4pm

In order for us to implement #139 it would be very useful for Lab Managers are able to understand why a DiagnosticReport was invalid and rejected on the Tamanu end. For example if there is a test that doesn't match then this could trigger a lab manager to reconcile the codings across the system.

Perhaps this is being done already and documented. If so please let us know where.

If not, I would propose maybe a common set of error codes we could extend over time?

{
  "resourceType": "OperationOutcome",
  "id": "dr-post-error-001",
  "issue": [
    {
      "severity": "error",
      "code": "code-invalid",
      "details": {
        "coding": [
          {
            "system": "http://terminology.hl7.org/CodeSystem/operation-outcome",
            "code": "MSG_CODE_UNKNOWN"
          }
        ],
        "text": "Unrecognised LOINC code '14749-6' in Observation.code"
      },
      "diagnostics": "The code '14749-6' (Glucose [Moles/volume] in Serum or Plasma) is not present in the EHR's configured LOINC value set.",
      "expression": [
        "Bundle.entry[2].resource.result[0].code"
      ]
    }
  ]
}

What does @rohan-bes think?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions