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

FHIR CodeSystem Fixes #1815

Open
5 tasks done
jamlung-ri opened this issue Mar 19, 2024 · 4 comments
Open
5 tasks done

FHIR CodeSystem Fixes #1815

jamlung-ri opened this issue Mar 19, 2024 · 4 comments
Assignees

Comments

@jamlung-ri
Copy link
Member

jamlung-ri commented Mar 19, 2024

On today's OCL Dev call, we talked through some of the issues that prevented the FHIR IG Publisher from generating a FHIR IG. The diffs of manual changes that I had to make can be found here and here.

Changes needed to OCL's FHIR Core CodeSystem:

  • “Count” field does not count inactive codes, but OCL FHIR Core does return inactive values (which was pointed out via the FHIR Validator)
    - Solution: "Count" needs to count all codes, whether active or inactive.
  • “Null” fields are intended to be excluded in FHIR e.g. "definition": null (see second-to-last paragraph on this page)
  • Concept Property’s “value” should be “valueString”
  • Had to add a whole new property -- "content": "complete" (FHIR Spec)
  • "type": "coding" -> "type": "Coding" (FHIR Spec)

I am attaching the current OCL FHIR CodeSystem resource and the one that I hand-edited, for reference in a comment below

@jamlung-ri
Copy link
Member Author

jamlung-ri commented Mar 19, 2024

Current OCL FHIR Core's CodeSystem:

{
    "resourceType": "CodeSystem",
    "url": "http://smart.who.int/immunizations-measles/CodeSystem/VaccineProducts",
    "title": "Vaccine Product codes CodeSet",
    "status": "active",
    "id": "VaccineProducts",
    "language": "en",
    "count": 2,
    "property": [
        {
            "code": "conceptclass",
            "uri": "https://api.staging.openconceptlab.org/orgs/OCL/sources/Classes/concepts",
            "description": "Standard list of concept classes.",
            "type": "string"
        },
        {
            "code": "datatype",
            "uri": "https://api.staging.openconceptlab.org/orgs/OCL/sources/Datatypes/concepts",
            "description": "Standard list of concept datatypes.",
            "type": "string"
        },
        {
            "code": "inactive",
            "uri": "http://hl7.org/fhir/concept-properties",
            "description": "True if the concept is not considered active.",
            "type": "coding"
        }
    ],
    "meta": {
        "lastUpdated": "2024-02-23T20:43:22.381603Z"
    },
    "version": "0.1.0",
    "name": "VaccineProducts",
    "description": "0.1.0",
    "publisher": "WHO",
    "experimental": true,
    "caseSensitive": true,
    "concept": [
        {
            "code": "7680007030014",
            "display": "M-M-RvaxPRO",
            "definition": null,
            "designation": [
                {
                    "language": "en",
                    "value": "M-M-RvaxPRO",
                    "use": null
                }
            ],
            "property": [
                {
                    "code": "conceptclass",
                    "value": "Drug"
                },
                {
                    "code": "datatype",
                    "value": "None"
                }
            ]
        },
        {
            "code": "20009060%2F2",
            "display": "Serum Institute of India Measles vaccine",
            "definition": null,
            "designation": [
                {
                    "language": "en",
                    "value": "Serum Institute of India Measles vaccine",
                    "use": null
                }
            ],
            "property": [
                {
                    "code": "conceptclass",
                    "value": "Drug"
                },
                {
                    "code": "datatype",
                    "value": "None"
                }
            ]
        },
        {
            "code": "1",
            "display": "Serum Institute of India Measles vaccine",
            "definition": null,
            "designation": [
                {
                    "language": "en",
                    "value": "Serum Institute of India Measles vaccine",
                    "use": null
                }
            ],
            "property": [
                {
                    "code": "conceptclass",
                    "value": "Drug"
                },
                {
                    "code": "datatype",
                    "value": "None"
                },
                {
                    "code": "inactive",
                    "value": true
                }
            ]
        }
    ],
    "identifier": [
        {
            "system": "https://api.staging.openconceptlab.org",
            "value": "/orgs/WHO-Smart-Guidelines/CodeSystem/VaccineProducts/",
            "type": {
                "text": "Accession ID",
                "coding": [
                    {
                        "system": "http://hl7.org/fhir/v2/0203",
                        "code": "ACSN",
                        "display": "Accession ID"
                    }
                ]
            }
        }
    ]
}

@jamlung-ri
Copy link
Member Author

Manually edited CodeSystem resource that worked with FHIR IG Publisher:

{
    "resourceType": "CodeSystem",
    "url": "http://smart.who.int/immunizations-measles/CodeSystem/VaccineProducts",
    "title": "Vaccine Product codes CodeSet",
    "status": "active",
    "id": "VaccineProducts",
    "language": "en",
    "count": 2,
    "property": [
        {
            "code": "conceptclass",
            "uri": "https://api.staging.openconceptlab.org/orgs/OCL/sources/Classes/concepts",
            "description": "Standard list of concept classes.",
            "type": "string"
        },
        {
            "code": "datatype",
            "uri": "https://api.staging.openconceptlab.org/orgs/OCL/sources/Datatypes/concepts",
            "description": "Standard list of concept datatypes.",
            "type": "string"
        },
        {
            "code": "inactive",
            "uri": "http://hl7.org/fhir/concept-properties",
            "description": "True if the concept is not considered active.",
            "type": "Coding"
        }
    ],
    "meta": {
        "lastUpdated": "2024-02-23T20:43:22.381603Z"
    },
    "version": "0.1.0",
    "name": "VaccineProducts",
    "description": "0.1.0",
    "publisher": "WHO",
    "content": "complete",
    "experimental": true,
    "caseSensitive": true,
    "concept": [
        {
            "code": "7680007030014",
            "display": "M-M-RvaxPRO",
            "designation": [
                {
                    "language": "en",
                    "value": "M-M-RvaxPRO"
                }
            ],
            "property": [
                {
                    "code": "conceptclass",
                    "valueString": "Drug"
                },
                {
                    "code": "datatype",
                    "valueString": "None"
                }
            ]
        },
        {
            "code": "20009060%2F2",
            "display": "Serum Institute of India Measles vaccine",
            "designation": [
                {
                    "language": "en",
                    "value": "Serum Institute of India Measles vaccine"
                }
            ],
            "property": [
                {
                    "code": "conceptclass",
                    "valueString": "Drug"
                },
                {
                    "code": "datatype",
                    "valueString": "None"
                }
            ]
        },
        {
            "code": "1",
            "display": "Serum Institute of India Measles vaccine",
            "designation": [
                {
                    "language": "en",
                    "value": "Serum Institute of India Measles vaccine"
                }
            ],
            "property": [
                {
                    "code": "conceptclass",
                    "valueString": "Drug"
                },
                {
                    "code": "datatype",
                    "valueString": "None"
                },
                {
                    "code": "inactive",
                    "valueString": true
                }
            ]
        }
    ],
    "identifier": [
        {
            "system": "https://api.staging.openconceptlab.org",
            "value": "/orgs/WHO-Smart-Guidelines/CodeSystem/VaccineProducts/",
            "type": {
                "text": "Accession ID",
                "coding": [
                    {
                        "system": "http://hl7.org/fhir/v2/0203",
                        "code": "ACSN",
                        "display": "Accession ID"
                    }
                ]
            }
        }
    ]
}

rkorytkowski added a commit to OpenConceptLab/oclapi2 that referenced this issue May 3, 2024
@rkorytkowski
Copy link
Contributor

@jamlung-ri the changes should be deployed to QA in a few minutes, see https://ci.openmrs.org/browse/OCL-OCLAPI2-1991

@jamlung-ri
Copy link
Member Author

Awesome, I tested this in QA and the diff is looking exactly how I expected!

And then it worked when testing against the FHIR IG Publisher! See this page for the new and improved CodeSystem, entirely created from OCL with no manual alterations: https://jamlung-ri.github.io/smart-catopia-measles/CodeSystem-VaccineProducts.html and https://github.com/jamlung-ri/smart-catopia-measles/blob/main/input/resources/CodeSystem-VaccineProducts.json

@rkorytkowski This should be ready to deploy to other environments.

snyaggarwal added a commit to OpenConceptLab/oclapi2 that referenced this issue May 9, 2024
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