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

Add the ability to generate $apply results with unique IDs #420

Closed
1 task
dubdabasoduba opened this issue Feb 12, 2024 · 2 comments
Closed
1 task

Add the ability to generate $apply results with unique IDs #420

dubdabasoduba opened this issue Feb 12, 2024 · 2 comments

Comments

@dubdabasoduba
Copy link

Context

  • The current $apply results create resources with IDs that are not unique i.e. executing $apply on the same PlanDef multiple times will generate MedicationRequests with the same IDs.
  • This means the Resources will override each other if the implementing applications try to persist them to the DB.

Implementation Requirement

  • Update the CQL evaluation to generate resources with unique UUIDs

Sample resources of the current resource generated

{
  "resourceType": "MedicationRequest",
  "id": "30",
  "meta": {
    "lastUpdated": "2024-01-24T19:31:01.327+05:00",
    "profile": [
      "http://hl7.org/fhir/uv/cpg/StructureDefinition/cpg-immunizationrequest"
    ]
  },
  "status": "draft",
  "intent": "proposal",
  "doNotPerform": false,
  "medicationCodeableConcept": {
    "coding": [
      {
        "system": "http://hl7.org/fhir/sid/icd-11",
        "code": "XM28X5",
        "display": "Measles vaccines"
      }
    ]
  },
  "subject": {
    "reference": "Patient/9a6188b4-cd60-41af-8880-c3f8464eef4b"
  },
  "instantiatesCanonical": [
    "http://smart.who.int/ig/smart-immunizations/ActivityDefinition/IMMZD2DTMeaslesMR"
  ]
}
{
  "resourceType": "OperationOutcome",
  "id": "apply-outcome-IMMZD2DTMeasles",
  "meta": {
    "lastUpdated": "2024-01-24T19:31:01.404+05:00"
  },
  "issue": [
    {
      "severity": "error",
      "code": "exception",
      "diagnostics": "Error encountered extracting b5887df8-a702-4d97-b207-c00991477e4a: Unable to retrieve Questionnaire code map for Observation based extraction"
    }
  ]
}
@dubdabasoduba
Copy link
Author

The OperationOutcome ID is generated here

@JPercival
Copy link
Contributor

Resolved by #429

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants