NHSDigital / integration-adaptor-lab-results

Integration Adaptor to simplify processing of Pathology and Screening results
Apache License 2.0
0 stars 6 forks source link

Specification Validation Error: Specimen missing mandatory 'collection' element #132

Closed Kusnaditjung closed 3 years ago

Kusnaditjung commented 3 years ago

Bugs Missing mandatory 'collection' element on Specimen, Error Message: "Validation Error : DiagnosticReport(1c2ffccb-186a-4193-a12e-f1b2c0bb6cee) Speciment : Specimen(34a0625d-5517-42a2-99c3-3a621c989c73) Collection : Missing mandatory collection element"

Though the element itself is mandatory, all the component are required, so this should be provided if they present in the edifact.

image

Step to reproduce

  1. Check message on
    • multi_pathology_ms2.fhir.json
    • screening.fhir.json
    • Nhs003->full_acceptance_with_nhsack.1.fhir.json
    • Nhs003 ->full_acceptance_with_nhsack.3.fhir.json
    • Nhs003 ->full_acceptance_without_nhsack.1.fhir.json
    • All NHS004 message
  2. Check that the collection element is missing from Specimen resource

Expected Behaviours The collection element must be present with at least one of the 'required' elements.

bartek-sarul commented 3 years ago

If required segments are present, the collection field is populated. In your example segment might be missing. image

Kusnaditjung commented 3 years ago

as the collection may be missing, does the messaging specification need amending (e.g required instead of mandatory) ??

bartek-sarul commented 3 years ago

Most likely it needs amendment in many places. I've raised that with NHS. For now we will proceed with what we have and slightly deviate from the specification due to lack of data available in EDIFACT