Saturday, April 26, 2025

Part 2 of series on Amazing power of HL7 FHIR and GenAI

 Today I worked on part 2 of the series (refer to the overview of the series here - https://healthinterconnect.blogspot.com/2025/04/amazing-power-of-hl7-fhir-supercharged.html ), it took longer than I expected, probably took about 4 hour. One of the key challenge is to render CodeableConcept, and also the resource reference, and resolve the issues for submitting the updated to backend APIs

Use data elements defined in FHIR StructureDefinition meta resource to auto render the CRUD form for the domain resource eg CarePlan

Few key issues fixed by copilot

1) now i can see the participant type dropdown box, however after i selected a value and submit, it shows the following error in browser console. Pls investigate and fix

2) now it shows the followin error in console, pls fixEncounterCrudPage.tsx:1484 Uncaught TypeError: Cannot add property type, object is not extensible at EncounterCrudPage.tsx:1484:58

3) the payload is not well formed for CodeableConcept, it shall not add the index. below is request payload for participant type element - 
"type": {
"0": {
"coding": [
{
"system": "http://terminology.hl7.org/CodeSystem/v3-ParticipationType",
"code": "CON",
"display": "Consultant"
}
],
"text": "senior consultant"
}
}
4) Good now it finally works. however i noticed that there is error 403 when it calling https://api.healthx.sg/fhir/r5/2807f247634c4f3c941568d460835a71/, we need to pass in the api key defined in env under variable VITE_API_KEY. Secondly instead of making API call in this page, we shall define the functions in #file: fhirweb-spa/src/services/client.ts, so that these functions can be used by other pages as well. Pls go through the occurences in this page and fix

5) in View mode, the page shows "Encounter for undefined undefined", please find out where this is shown, please propose a possible fix

6) pls change another approach - First check patient name full text in HumanName.text attribute, If there is value in this attribute, display this value for patient name. Otherwise concatenate the family and given attribute of HumanName

7) the "Class" field in this page is showing "Unknown class", please show empty string if there is not defined or no value

No comments:

Post a Comment

Part 2 of series on Amazing power of HL7 FHIR and GenAI

 Today I worked on part 2 of the series (refer to the overview of the series here - https://healthinterconnect.blogspot.com/2025/04/amazing-...