athenahealth / apiserver-athenaFlex

Software developers can use sample code and documentation to use athenahealth's athenaPractice/athenaFlow FHIR API Server.
https://mydata.athenahealth.com/home
17 stars 7 forks source link

how to get HDID codes for those observation item? #301

Open toby-bian opened 4 months ago

toby-bian commented 4 months ago

I am trying to post the observation bundle, there is a Sample_FHIR_OBS_Write_Bundle.txt provided from #197, however when I use it, i got error "Found multiple HDID for the provided loinc code", so my question is how to get HDID codes for the observation items if I know the loinc code? for example:

                <coding>
                    <system value="http://loinc.org"/>
                    <code value="8310-5"/>
                    <display value="Body Temperature"/>
                </coding>

                                     <coding>
                    <system value="http://loinc.org"/>
                    <code value="9279-1"/>
                    <display value="Respiratory Rate"/>
                </coding>

                                     <coding>
                    <system value="http://loinc.org"/>
                    <code value="8867-4"/>
                    <display value="Heart rate"/>
                </coding>

May have other items as well, like SPO2(Oxygen saturation in Blood)....

{"resourceType":"Bundle","id":"c9eba6cd-fc72-43e3-a916-235de1869d1e","type":"transaction-response","link":[{"relation":"self","url":"https://ap22sandbox.fhirapi.athenahealth.com/demoAPIServer/fhir/r4"}],"entry":[{"id":"entry1","resource":{"resourceType":"Observation","text":{"status":"generated","div":"<div xmlns=\"http://www.w3.org/1999/xhtml\"><table width=\"100%\"><a href=\"Patient/2023520403223770\">Patient/2023520403223770<td width=\"25%\"><span class=\"text-muted\">temperature E&M (8310-5 LOINC)<td width=\"42%\"><span class=\"text-muted\">org.hl7.fhir.r4.model.Quantity@29893db8<td width=\"8%\"><span class=\"text-muted\"> ? <td width=\"25%\"> -- <a href=\"Practitioner/1225652472001060\">Practitioner/1225652472001060 ?

"},"status":"final","code":{"coding":[{"system":"http://loinc.org","code":"8310-5","display":"Body Temperature"},{"system":"http://www.gehealthcare.com/fhir/cpsemr/codesystem/HDID/Training","code":"2641","display":"TEMPERATURE"}],"text":"temperature E&M"},"subject":{"reference":"Patient/2023520403223770"},"performer":[{"reference":"Practitioner/1225652472001060"}],"valueQuantity":{"value":98.599999999999994,"unit":"[degF]","system":"http://unitsofmeasure.org","code":"[degF]"}},"response":{"extension":[{"url":"https://docs.mydata.athenahealth.com/fhir-r4/StructureDefinition/athena-bundle-response-issue-diagnostics","valueString":"Found multiple HDID for the provided loinc code [59, 1000, 2641, 17663, 36744, 36745, 36746, 36747, 52009, 52010, 52011, 82718, 4254, 4254] "}],"status":"400 Bad Request"}},{"id":"entry2","resource":{"resourceType":"Observation","text":{"status":"generated","div":"<div xmlns=\"http://www.w3.org/1999/xhtml\"><table width=\"100%\"><a href=\"Patient/2023520403223770\">Patient/2023520403223770<td width=\"25%\"><span class=\"text-muted\">Respiratory Rate (9279-1 LOINC)<td width=\"42%\"><span class=\"text-muted\">org.hl7.fhir.r4.model.Quantity@4c6e5da8<td width=\"8%\"><span class=\"text-muted\"> ? <td width=\"25%\"> -- <a href=\"Practitioner/1225652472001060\">Practitioner/1225652472001060 ?
"},"status":"final","code":{"coding":[{"system":"http://loinc.org","code":"9279-1","display":"Respiratory Rate"},{"system":"http://www.gehealthcare.com/fhir/cpsemr/codesystem/HDID/Training042","code":"57","display":"RESP RATE"}]},"subject":{"reference":"Patient/2023520403223770"},"performer":[{"reference":"Practitioner/1225652472001060"}],"valueQuantity":{"value":24,"unit":"/min","system":"http://unitsofmeasure.org","code":"/min"}},"response":{"extension":[{"url":"https://docs.mydata.athenahealth.com/fhir-r4/StructureDefinition/athena-bundle-response-issue-diagnostics","valueString":"Found multiple HDID for the provided loinc code [57, 19975, 19976, 52059, 52060, 82722, 87729, 87730, 87731, 87732, 87733] "}],"status":"400 Bad Request"}},{"id":"entry3","resource":{"resourceType":"Observation","text":{"status":"generated","div":"<div xmlns=\"http://www.w3.org/1999/xhtml\"><table width=\"100%\"><a href=\"Patient/2023520403223770\">Patient/2023520403223770<td width=\"25%\"><span class=\"text-muted\">Heart rate (8867-4 LOINC)<td width=\"42%\"><span class=\"text-muted\">org.hl7.fhir.r4.model.Quantity@73911e3b<td width=\"8%\"><span class=\"text-muted\"> ? <td width=\"25%\"> -- <a href=\"Practitioner/1225652472001060\">Practitioner/1225652472001060 ? "},"status":"final","code":{"coding":[{"system":"http://loinc.org","code":"8867-4","display":"Heart rate"},{"system":"http://www.gehealthcare.com/fhir/cpsemr/codesystem/HDID/Training042","code":"56","display":"PULSE RATE"}]},"subject":{"reference":"Patient/2023520403223770"},"performer":[{"reference":"Practitioner/1225652472001060"}],"valueQuantity":{"value":86,"unit":"/min","system":"http://unitsofmeasure.org","code":"/min"}},"response":{"extension":[{"url":"https://docs.mydata.athenahealth.com/fhir-r4/StructureDefinition/athena-bundle-response-issue-diagnostics","valueString":"Found multiple HDID for the provided loinc code [56, 2970, 2971, 2972, 5916, 5917, 5918, 5919, 8832, 19973, 21695, 21696, 21697, 52033, 52034, 52035, 52036, 82720, 92417, 140024, 140025, 140026, 140027, 140028, 140029] "}],"status":"400 Bad Request"}}]}