NHSDigital / integration-adaptor-nhais

Adaptors which accelerate integration with national NHS systems
Apache License 2.0
5 stars 3 forks source link

Amend patient name with passing invalid residential code value type accepting integer value instead of string value #198

Closed ghost closed 3 years ago

ghost commented 4 years ago

Amend patient name with passing invalid residential code value type accepting integer value instead of string value

{ "nhsNumber": "9999999999", "gpCode": "2750922,295", "gpTradingPartnerCode": "TES5", "healthcarePartyCode": "XX1", "freeText": "NOW AT THE ARTHUR ANDREWS CENTRE", "patches": [ { "op": "replace", "path": "/name/0/family", "value": "ROBINSON-PATTERSON" }, { "op": "add", "path": "/name/1/family", "value": "PATTERSON" }, { "op": "replace", "path": "/name/0/given/0", "value": "SALLY" }, { "op": "add", "path": "/name/0/given/1", "value": "JANE" }, { "op": "replace", "path": "/name/0/given/2", "value": "MARY KIMBERLY" }, { "op": "add", "path": "/name/0/prefix/0", "value": "MRS" }, { "op": "replace", "path": "/gender", "value": "unknown" }, { "op": "add", "path": "/birthDate", "value": "1980-05-23" }, { "op": "replace", "path": "/address/0/line/0", "value": "HOLLY COTTAGE" }, { "op": "add", "path": "/address/0/line/1", "value": "12 LONG LANE" }, { "op": "replace", "path": "/address/0/line/2", "value": "LITTLE HAMLET" }, { "op": "add", "path": "/address/0/line/3", "value": "BROMLEY" }, { "op": "replace", "path": "/address/0/line/4", "value": "KENT" }, { "op": "add", "path": "/address/0/postalCode", "value": "BR5 4ER" }, { "op": "replace", "path": "/extension/0", "value": { "url": "https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-NHAIS-DrugsDispensedMarker", "valueBoolean": true } }, { "op": "add", "path": "/extension/0", "value": { "url": "https://fhir.nhs.uk/R4/StructureDefinition/Extension-UKCore-NHAIS-ResidentialInstituteCode", "valueString": 123 } } ] }

michael-kainos commented 4 years ago

Will look into this to verify if this is still being passed as a string value

mattd-kainos commented 4 years ago

Despite being the wrong JSON type the residential institute code 123 is translated into EDIFACT and sent to NHAIS. The translated interchange is enclosed below with the RIC segment in bold.

UNB+UNOA:2+TES5+XX11+200820:1109+00000001' UNH+00000001+FHSREG:0:1:FH:FHS001' BGM+++507' NAD+FHS+XX1:954' DTM+137:202008201109:203' RFF+950:G2' S01+1' RFF+TN:1' NAD+GP+2750922,295:900' NAD+RIC+123:956' HEA+DM+Y:ZZZ' FTX+RGI+++NOW AT THE ARTHUR ANDREWS CENTRE' S02+2' PNA+PAT+9999999999:OPI+++SU:ROBINSON-PATTERSON+FO:SALLY+TI:MRS+MI:JANE+FS:MARY KIMBERLY' DTM+329:19800523:102' PDI+0' NAD+PAT++HOLLY COTTAGE:12 LONG LANE:LITTLE HAMLET:BROMLEY:KENT+++++BR5 4ER' S02+2' PNA+PER++++SU:PATTERSON' UNT+19+00000001' UNZ+1+00000001'