Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nullpointer in HistoryGenerator #972

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

dotasek
Copy link
Collaborator

@dotasek dotasek commented Oct 9, 2024

In the ITI.MHD IG, the following fsh generated resource (ITI.MHD/fsh-generated/resources/Bundle-ex-response-comprehensiveProvideDocumentBundleComplete.json) causes a NullPointer exception when processed by HistoryGenerator.

{
  "resourceType": "Bundle",
  "id": "ex-response-comprehensiveProvideDocumentBundleComplete",
  "meta": {
    "security": [
      {
        "code": "HTEST",
        "system": "http://terminology.hl7.org/CodeSystem/v3-ActReason"
      }
    ],
    "profile": [
      "https://profiles.ihe.net/ITI/MHD/StructureDefinition/IHE.MHD.ProvideDocumentBundleResponse"
    ]
  },
  "type": "transaction-response",
  "link": [
    {
      "relation": "self",
      "url": "http://example.com/fhir"
    }
  ],
  "entry": [
    {
      "response": {
        "status": "201 Created",
        "location": "List/501",
        "lastModified": "2020-10-05T11:56:15.094+00:00"
      }
    },
    {
      "response": {
        "status": "201 Created",
        "location": "List/502",
        "lastModified": "2020-10-05T11:56:15.095+00:00"
      }
    },
    {
      "response": {
        "status": "201 Created",
        "location": "DocumentReference/501",
        "lastModified": "2020-10-05T11:56:15.096+00:00"
      }
    },
    {
      "response": {
        "status": "201 Created",
        "location": "Binary/501",
        "lastModified": "2020-10-05T11:56:15.097+00:00"
      }
    }
  ]
}

The response entries do not contain a resource child, and cause null pointers.

Copy link
Contributor

@grahamegrieve grahamegrieve left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@grahamegrieve grahamegrieve merged commit 409eb9b into master Oct 9, 2024
18 checks passed
@grahamegrieve grahamegrieve deleted the do-20241009-historygenerator-nullpointer-fix branch October 9, 2024 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

2 participants