Skip to content

Conversation

@plarocque4
Copy link
Contributor

Describe your changes

Add a new operation to the FHIR server at:
/GuidanceResponse/$rems-etasu

This FHIR Operation takes a Patient and Medication resource in a fair Parameters and returns a GuidanceResponse with contained GuidanceResponses representing the ETASU status.

A 'Pending' status has been mapped to 'data-required' and 'Approved' is mapped to 'success'.

The easiest way to test is using postman.
Example POST body request for Isotretinoin:
http://localhost:8090/4_0_0/GuidanceResponse/$rems-etasu

{
    "resourceType" : "Parameters",
    "parameter" : [
        {
            "name" : "patient",
            "resource": {
                "resourceType": "Patient",
                "id": "pat017",
                "identifier": [
                    {
                        "system": "http://hl7.org/fhir/sid/us-medicare",
                        "value": "0V843229061TB"
                    }
                ],
                "name": [
                    {
                        "use": "official",
                        "family": "Snow",
                        "given": [
                            "Jon",
                            "Stark"
                        ]
                    }
                ],
                "gender": "male",
                "birthDate": "1996-06-01",
                "address": [
                    {
                        "use": "home",
                        "type": "both",
                        "line": [
                            "1 Winterfell Rd"
                        ],
                        "city": "Winterfell",
                        "state": "Westeros",
                        "postalCode": "00008"
                    }
                ]
            }
        },
        {
            "name" : "medication",
            "resource": {
                "resourceType": "Medication",
                "id": "med-iso",
                "code": {
                    "coding": [ {
                        "system": "http://www.nlm.nih.gov/research/umls/rxnorm",
                        "code": "6064",
                        "display": "Isotretinoin 20 MG Oral Capsule"
                    }, {
                        "system": "http://hl7.org/fhir/sid/ndc",
                        "code": "0245-0571-01"
                    } ] 
                }
            }   
        }
    ]
}

Response:

{
    "resourceType": "Parameters",
    "parameter": [
        {
            "name": "rems-etasu",
            "resource": {
                "resourceType": "GuidanceResponse",
                "status": "data-required",
                "moduleUri": "https://build.fhir.org/ig/HL7/fhir-medication-rems-ig/",
                "subject": {
                    "reference": "Patient/pat017"
                },
                "outputParameters": {
                    "reference": "#etasuOutputParameters"
                },
                "contained": [
                    {
                        "resourceType": "Parameters",
                        "id": "etasuOutputParameters",
                        "parameter": [
                            {
                                "name": "Patient Enrollment",
                                "resource": {
                                    "resourceType": "GuidanceResponse",
                                    "status": "success",
                                    "moduleUri": "https://build.fhir.org/ig/HL7/fhir-medication-rems-ig/",
                                    "subject": {
                                        "reference": "Patient/pat017"
                                    },
                                    "note": [
                                        {
                                            "text": "Patient Enrollment"
                                        }
                                    ]
                                }
                            },
                            {
                                "name": "Prescriber Enrollment",
                                "resource": {
                                    "resourceType": "GuidanceResponse",
                                    "status": "data-required",
                                    "moduleUri": "https://build.fhir.org/ig/HL7/fhir-medication-rems-ig/",
                                    "subject": {
                                        "reference": "Practitioner/pra1234"
                                    },
                                    "note": [
                                        {
                                            "text": "Prescriber Enrollment"
                                        }
                                    ]
                                }
                            },
                            {
                                "name": "Pharmacist Enrollment",
                                "resource": {
                                    "resourceType": "GuidanceResponse",
                                    "status": "success",
                                    "moduleUri": "https://build.fhir.org/ig/HL7/fhir-medication-rems-ig/",
                                    "subject": {
                                        "reference": "Organization/pharm0111"
                                    },
                                    "note": [
                                        {
                                            "text": "Pharmacist Enrollment"
                                        }
                                    ]
                                }
                            }
                        ]
                    }
                ]
            }
        }
    ]
}

Issue ticket number and Jira link

REMS-533

Checklist before requesting a review

  • I have performed a self-review of my code
  • Ensure the target / base branch for any feature PR is set to dev not main (the only exception to this is releases from dev and hotfix branches)

Checklist for conducting a review

  • Review the code changes and make sure they all make sense and are necessary.
  • Pull the PR branch locally and test by running through workflow and making sure everything works as it is supposed to.

Workflow

Owner of the Pull Request will be responsible for merge after all requirements are met, including approval from at least one reviewer. Additional changes made after a review will dismiss any approvals and require re-review of the additional updates. Auto merging can be enabled below if additional changes are likely not to be needed. The bot will auto assign reviewers to your Pull Request for you.

Copy link
Contributor

@zacharyrobin zacharyrobin left a comment

Choose a reason for hiding this comment

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

Tested in postman ✅

@plarocque4 plarocque4 merged commit cd75f59 into dev Mar 27, 2024
@plarocque4 plarocque4 deleted the fhir-etasu branch March 27, 2024 14:14
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

Successfully merging this pull request may close these issues.

3 participants