Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HAPI failing to return Basic resource after successful upload

I'm trying to upload a resource to HAPI. It's based on the resource type basic, and I have created a custom profile(and extensions) for the concept I'm trying to capture. I have uploaded those StructureDefinitions to the server I'm using (hosted on local host), but I am not yet validating this upload against it (still trying to test that the format I've been using for my xml is correct).

I've uploaded the following bundle (there are many more records in the actual bundle, I've just edited it down for clarity):

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Bundle>
  <meta>
    <lastUpdated value="2016-10-28T16:29:43Z"/>
  </meta>
  <type value="transaction"/>
  <entry>
    <resource>
      <Basic>
        <text>
          <status value="generated"/>
          <div/>
        </text>
        <extension url="http://localhost:1080/hapi-fhir-jpaserver-example/baseDstu2/StructureDefinition/DateID">
          <valueDate value="2016-11-01"/>
        </extension>
        <extension url="http://localhost:1080/hapi-fhir-jpaserver-example/baseDstu2/StructureDefinition/SptSolution">
          <valueCoding value="SptSolution.CatFurSPTSoln"/>
        </extension>
        <extension url="http://localhost:1080/hapi-fhir-jpaserver-example/baseDstu2/StructureDefinition/MethodOfFollowUp">
          <valueCoding value="FollowUpMethod.ClinicVisit"/>
        </extension>
        <extension url="http://localhost:1080/hapi-fhir-jpaserver-example/baseDstu2/StructureDefinition/SPTDefinition">
          <valueString value="A positive skin prick test result was defined as a mean wheal diameter of 3mm greater than that of the negative control"/>
        </extension>
        <extension url="http://localhost:1080/hapi-fhir-jpaserver-example/baseDstu2/StructureDefinition/SubjectNo">
          <valueString value="4320"/>
        </extension>
        <extension url="http://localhost:1080/hapi-fhir-jpaserver-example/baseDstu2/StructureDefinition/AIW">
          <valueInteger value="58"/>
        </extension>
        <extension url="http://localhost:1080/hapi-fhir-jpaserver-example/baseDstu2/StructureDefinition/FollowUp">
          <valueCoding value="FollowUp.MSAge1Y"/>
        </extension>
        <extension url="http://localhost:1080/hapi-fhir-jpaserver-example/baseDstu2/StructureDefinition/Subject">
          <valueCoding value="Person.StudySubject"/>
        </extension>
        <extension url="http://localhost:1080/hapi-fhir-jpaserver-example/baseDstu2/StructureDefinition/VariableLabel">
          <valueString value="Child sensitised to cat (age 1 spt)"/>
        </extension>
        <extension url="http://localhost:1080/hapi-fhir-jpaserver-example/baseDstu2/StructureDefinition/SPTDataType">
          <valueCoding value="SkinPrickTestData.SPTResult"/>
        </extension>
        <extension url="http://localhost:1080/hapi-fhir-jpaserver-example/baseDstu2/StructureDefinition/DataSource">
          <valueCoding value="DataSource.ClinicalMeasurement"/>
        </extension>
        <extension url="http://localhost:1080/hapi-fhir-jpaserver-example/baseDstu2/StructureDefinition/ClinicalType">
          <valueCoding value="ClinicalMeasurement.SkinPrickTest"/>
        </extension>
        <extension url="http://localhost:1080/hapi-fhir-jpaserver-example/baseDstu2/StructureDefinition/DataSPTResult">
          <valueCoding value="TestResult.Negative"/>
        </extension>
      </Basic>
    </resource>
    <request>
      <method value="POST"/>
      <url value="Basic"/>
    </request>
  </entry>
</Bundle>

Which seems to have uploaded correctly, since I get the response:

<Bundle xmlns="http://hl7.org/fhir">
    <id value="5d8d77ed-762f-4a64-b6b1-7a3aeacac52f"/>
    <type value="transaction-response"/>
    <link>
        <relation value="self"/>
        <url value="http://localhost:8080/hapi-fhir-jpaserver-example/baseDstu2"/>
    </link>
    <entry>
        <response>
            <status value="201 Created"/>
            <location value="Basic/1107/_history/1"/>
            <etag value="1"/>
            <lastModified value="2016-11-01T15:09:56.264+00:00"/>
        </response>
    </entry>
</Bundle>

However when I try to access this via the URL:

{{URL}}/Basic/1107

I get the following response:

{
  "resourceType": "OperationOutcome",
  "text": {
    "status": "generated",
    "div": "<div xmlns=\"http://www.w3.org/1999/xhtml\"><h1>Operation Outcome</h1><table border=\"0\"><tr><td style=\"font-weight: bold;\">error</td><td>[]</td><td><pre>Failed to call access method</pre></td>\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t</tr>\n\t\t</table>\n\t</div>"
  },
  "issue": [
    {
      "severity": "error",
      "code": "processing",
      "diagnostics": "Failed to call access method"
    }
  ]
}

Any idea what could be causing this issue? It works fine when I upload patients and try to pull them back, But trying it for basic does not seem to work.

like image 922
Andy Avatar asked Feb 05 '23 19:02

Andy


1 Answers

This is indeed a bug in HAPI. I'm about to check in a fix.

FWIW you can work around it by not including the empty <div/> tag in your narrative (or adding content to the div).

like image 80
James Agnew Avatar answered May 17 '23 07:05

James Agnew