Question
· Oct 1, 2018

Issues manually creating HS.SDA3.Patient

Hi all.

As part of my dysfunctional journey with FHIR, I'm looking at using the SDA3 within Healthshare to then convert to the HSFHIR format.

This is working surprisingly well, except I'm falling over when it comes to repeating fields within the SDA3 when creating the HS.SDA3.Patient object manually from within Cache.

If I take the Patient ID as an example - within a DTL, I can quite easily take an MRN and add that to the target PatientNumbers.(1).Number and then add an NHS number to the target PatientNumbers.(2).Number.

My assumption is that I will need to build the list of PatientNumbers using multiple PatientNumber items, but in practice I'm lost. 

Discussion (1)0
Log in or sign up to continue

Hi all, I have answered my own question.

Per number, I will need to create a new HS.SDA3.PatientNumber and set the required information, and then insert each HS.SDA3.PatientNumber into the HS.SDA3.PatientNumbers list that exists within the HS.SDA3.Patient object.

For the benefit of anyone else that stumbles across this post (and myself when I forget this in a few weeks time and end up finding my own post): To achieve this in Terminal as a testing area, these are the steps I followed:

Set Patient  = ##class(HS.SDA3.Patient).%New()

Set PatNum1 = ##class(HS.SDA3.PatientNumber).%New()

Set PatNum2 = ##class(HS.SDA3.PatientNumber).%New()

Set PatNum1.Number = "123456"

Set PatNum1.NumberType = "MRN"

Set PatNum2.Number = "9999991234"

Set PatNum2.NumberType = "NHS"

Do Patient.PatientNumbers.Insert(PatNum1)

Do Patient.PatientNumbers.Insert(PatNum2)