Not able to save Immunization to a patient

Hi @Platform_Team ,

I am trying to save the below Immunization to a patient “Betty Williams”, and I am sending the below JSON snippet to the FHIR URL /ws/fhir2/R4/Immunization and I am not able to understand the diagnostics returned.

{
    "resourceType": "Immunization",
    "status": "completed",
    "id": "",
    "vaccineCode": {
      "coding": [
        {
          "code": "5261AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",
          "display": "Hemophilus influenza B vaccination"
        }
      ]
    },
    "patient": {
        "type": "Patient",
        "reference": "Patient/2c21958f-428b-4628-b4ab-73f512a2074f"
    },
    "encounter":{
        "type": "Encounter",
        "reference": "Encounter/5fa2ff1b-29fa-48cf-98e4-42f1a15fc51b"
    },
    "occurrenceDateTime": "2022-10-14T06:21:33.399Z",
    "expirationDate": "2022-12-31T18:30:00.000Z",
    "location": {
        "type": "Location",
        "reference": "Location/44c3efb0-2583-4c80-a79e-1f756a03c0a1"
    },
    "performer": [{
        "actor": {
            "type": "Practitioner",
            "reference": "Practitioner/a4794659-f809-4415-9978-fb42d102db12"
        }
    }],
    "manufacturer": { "display": "Test" },
    "lotNumber": "Lot1234",
    "protocolApplied": [{
        "doseNumberPositiveInt": 1,
        "series": "Dose-1"
    }]
}

Please do help me with this. Thanks!

Do you see the diagnostics in your postman screenshot?

Yes @dkayiwa , but I am not able to understand what it means, given my almost zero knowledge on the Immunizations.

From the answers of the CIEL:984 concepts, I couldn’t find any vaccines(answers) relating to CIEL:1410.

Thanks!

Hi @dkayiwa , I just realised the description written is wrong, sincere apologies for that.

@grace @dkayiwa, any idea what we need to do to save the above Immunization?

Thanks!

More metadata issues. CIEL:1410 is the Vaccination date concept. While that concept appears to be loaded on dev3, the mapping that says it is SAME-AS CIEL:1410 is missing. OpenMRS - Login

OK, after our discussion in the O3 squad call today, I’m trying to make sure I’ve updated all the metadata we need for this.

@ibacher you recently mentioned to me that “it looks like some CIEL mappings aren’t included in the Immunizations export” - in followup with @jamlung I learned that Parent concepts, i.e. concepts with a -1 superscript/inverse notation, do NOT get auto-pulled in (see Joe’s notes in slack here). So eg for 1410, it had 2 parent concepts, 1441 and 1421. I’ve now added both those to our Immunization Medatada set with this pr here.

I’ve also confirmed that “CIEL 5261A…”, mentioned in Vineet’s first post in this thread, is now included in the collection. Along with concepts for things like lot number etc.

@vasharma05 once my PR (#650) is merged, can you check and see if you are still blocked?

Update: Hadijah and Juliet were still facing error messages.

But: I think I have finally tracked down the source of the Immunization metadata error. Please see my PR here - I think this should unblock us: Updating CIEL Immunization Collection: Add concept 162339 by gracepotma · Pull Request #652 · openmrs/openmrs-distro-referenceapplication · GitHub

My lesson learned is: In the future, before we commit any metadata to our 3.x /ocl distro config, we should first check for errors using the OCL Subscription Module workflow in dev3.

So: After realizing I should use the OCL Subscription Module error UI to check for errors in our metadata config files, I have gone through every single one of our O3 refapp /ocl config metadata collections and checked all of them for errors - since I feel quite bad for the experience that @Hadijah, @Vineet Sharma and @Juliet Wamalwa have had trying to debug the Immunizations metadata. Hoping to prevent this from happening to others. I found 2 other demo data collections with similar issues and have made PRs to resolve these errors.You can see my full Findings and notes here: O3 Exploratory QA: OpenMRS 3.x Requirements Rubric - Google Sheets

Thanks so much I really appreciate your work with the entire OCL team but its unfortunate I can save the form its the error below that is standing between me and the PR for final review and I believe in you for the success.

.

cc @ibacher, @akanter, @ball, @jamlung

Hi @grace kindly any updates on the above error?

@dkayiwa what do you think about this error message? Generally when I have seen ones similar to this it was because a concept or mapping was missing. But I believe I have exhaustively fixed that.

I am genuinely stumped here. But I also don’t know what this error message means at all so I’m not sure how to help next.

@jwnasambu does your server have a concept mapped to CIEL:1418?

Just to ensure am on the correct path, I followed this steps to arrive at the answer:

I run this command yarn start --sources 'packages/esm-patient-immunizations-app' to start my local server

Clicked on app menu and selected system Administration → View Concept Dictionary

on the Concept Dictionary Maintenance page, I searched the concept by Id that 1418 and below is the screenshot of the output

Thanks

Here is an example of how you would find a concept mapped to CIEL:679 on dev3: https://dev3.openmrs.org/openmrs/ws/rest/v1/concept/CIEL:679

1 Like

Thanks so much. When I search a concept mapped to CIEL:1418 this is what I get https://dev3.openmrs.org/openmrs/ws/rest/v1/concept/CIEL:1418

So, looking at the collection in OCL, specifically, all the SAME-AS mappings from CIEL concepts to other CIEL concepts, I notice we’re still missing a lot of the SAME-AS mappings from the Immunization History set members. Specifically, I only see mappings for these set members:

  • 1410
  • 1421
  • 984

So we’re still missing a few. We tried to design things to be lenient, but IIRC, the minimum requirements are:

  • CIEL:1418 (Sequence number)
  • CIEL:984 (Coded vaccination)
  • CIEL: 1410 (Vaccination date)

It looks like none of the concepts that were brought in from OCL have the mappings attached (CIEL, SNOMED, etc.). That means that when you search by CIEL code, nothing comes up. I would reimport the collection after it has been re-expanded on OCL to include all cascading references. When someone wants to reference a concept by the CIEL ID, do they have to convert to the UUID from CIEL? Should there be a mapping to CIEL in the concept as well when it comes in from the subscription module?

Andy, am so glad the concept CIEL:1418 was mapped but still getting the same error but this time complaining concept CIEL:1419 not mapped. Am glad @jamlung has offered to sync with me. Thanks so so much for your help I learnt something new and am grateful for that.

Am sorry for confusing you. This is the current error when I click save button on the immunization form