Skip to content

Conversation

@jtquach1
Copy link
Contributor

@jtquach1 jtquach1 commented Apr 17, 2024

Describe your changes

Please include a summary of the changes and the related issue/task. Please also include relevant motivation and context. List any dependencies that are required for this change, including links to other pull requests/branches in other repositories if applicable.

  • Add REMS drugs/REMS admin endpoints table
  • refactored code (getting GuidanceResponse and MedicationDispense.status for DoctorOrder creation and for updating DoctorOrder)
  • removed env var in env.json that refers to one REMS admin endpoint
  • replaced call to updateRx/?dontUpdateStatus to a call to a new updateRx/:id/metRequirements endpoint,
  • hid View ETASU button for non-REMS drugs
  • added separate getRx endpoints for pending, approved, and picked up drugs

Issue ticket number and Jira link

Please include the Jira Ticket Number and Link for this issue/task.

https://jira.mitre.org/browse/REMS-662

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.

@jtquach1 jtquach1 marked this pull request as draft April 17, 2024 17:21
…var, replace call to updateRx/?dontUpdateStatus to a call to a new updateRx/:id/metRequirements endpoint, hide View ETASU button for non-REMS drugs, and add separate getRx endpoints for pending, approved, and picked up drugs
@jtquach1 jtquach1 force-pushed the support-medications-with-no-rems branch from f9da395 to a54aeef Compare April 17, 2024 20:34
@jtquach1 jtquach1 changed the title Support medications with no REMS Support medications with no REMS and make minor code tweaks in backend endpoints/frontend calls Apr 17, 2024
@jtquach1 jtquach1 marked this pull request as ready for review April 17, 2024 20:36
@jtquach1 jtquach1 force-pushed the support-medications-with-no-rems branch from aa69cc4 to c447230 Compare April 17, 2024 20:46
@jtquach1 jtquach1 force-pushed the support-medications-with-no-rems branch from c447230 to c553a87 Compare April 17, 2024 20:47
@jtquach1
Copy link
Contributor Author

Screenshots
image
image
image
image
image
image
image

@avirgulto avirgulto self-assigned this Apr 18, 2024
@avirgulto
Copy link
Contributor

Is the addyi a medication that doesn't have REMS? I went through the steps and when I sign the order it looks like what gets back doesn't have any smart links. When I go to pharmacy there is a view etasu button that is blank and then it does let me verify the order.
Screenshot 2024-04-22 at 9 23 32 PM
Screenshot 2024-04-22 at 9 24 52 PM
Screenshot 2024-04-22 at 9 24 46 PM
Screenshot 2024-04-22 at 9 24 44 PM

@jtquach1
Copy link
Contributor Author

Is the addyi a medication that doesn't have REMS? I went through the steps and when I sign the order it looks like what gets back doesn't have any smart links. When I go to pharmacy there is a view etasu button that is blank and then it does let me verify the order. Screenshot 2024-04-22 at 9 23 32 PM Screenshot 2024-04-22 at 9 24 52 PM Screenshot 2024-04-22 at 9 24 46 PM Screenshot 2024-04-22 at 9 24 44 PM

Addyi is a REMS drug but it has no ETASU- it just has a PDF for the patient and practitioner that says "here are the side effects, just know what they are"- at least that's my understanding if I paraphrased from Pat (who added it) correctly

@avirgulto
Copy link
Contributor

Is the addyi a medication that doesn't have REMS? I went through the steps and when I sign the order it looks like what gets back doesn't have any smart links. When I go to pharmacy there is a view etasu button that is blank and then it does let me verify the order. Screenshot 2024-04-22 at 9 23 32 PM Screenshot 2024-04-22 at 9 24 52 PM Screenshot 2024-04-22 at 9 24 46 PM Screenshot 2024-04-22 at 9 24 44 PM

Addyi is a REMS drug but it has no ETASU- it just has a PDF for the patient and practitioner that says "here are the side effects, just know what they are"- at least that's my understanding if I paraphrased from Pat (who added it) correctly

Okay so the behavior described above is accurate? It should be able to be verified and picked up even though the etasu is empty? How do I add a prescription that isn't a REMS drug to the DB to test this part out?

@jtquach1
Copy link
Contributor Author

jtquach1 commented Apr 23, 2024

Is the addyi a medication that doesn't have REMS? I went through the steps and when I sign the order it looks like what gets back doesn't have any smart links. When I go to pharmacy there is a view etasu button that is blank and then it does let me verify the order. Screenshot 2024-04-22 at 9 23 32 PM Screenshot 2024-04-22 at 9 24 52 PM Screenshot 2024-04-22 at 9 24 46 PM Screenshot 2024-04-22 at 9 24 44 PM

Addyi is a REMS drug but it has no ETASU- it just has a PDF for the patient and practitioner that says "here are the side effects, just know what they are"- at least that's my understanding if I paraphrased from Pat (who added it) correctly

Okay so the behavior described above is accurate? It should be able to be verified and picked up even though the etasu is empty? How do I add a prescription that isn't a REMS drug to the DB to test this part out?

Yeah, the behavior you described above is accurate. To add a prescription that isn't a REMS drug I think you can copy/paste a JSON file in test-ehr

e.g.
https://github.com/mcode/test-ehr/blob/dev/fhirResourcesToLoad/rems_snow_medicationrequest_addyi.json

then do gradle loadData while gradle bootRun is running in a different window, and then you should be able to see the list of MedicationRequests (at least for Jon Snow) if you click the refresh button in request-generator (I think for rems-smart-on-fhir that may have to be a hard reload)

Although if you were to add a REMS drug with ETASU then that'd require modifying the backend/src/database/data.js (that I added in this PR, although I wasn't sure whether to make a whole new file like the data.js or reuse the env.json for people who wanted to still use environment variables)

@avirgulto
Copy link
Contributor

Is the addyi a medication that doesn't have REMS? I went through the steps and when I sign the order it looks like what gets back doesn't have any smart links. When I go to pharmacy there is a view etasu button that is blank and then it does let me verify the order. Screenshot 2024-04-22 at 9 23 32 PM Screenshot 2024-04-22 at 9 24 52 PM Screenshot 2024-04-22 at 9 24 46 PM Screenshot 2024-04-22 at 9 24 44 PM

Addyi is a REMS drug but it has no ETASU- it just has a PDF for the patient and practitioner that says "here are the side effects, just know what they are"- at least that's my understanding if I paraphrased from Pat (who added it) correctly

Okay so the behavior described above is accurate? It should be able to be verified and picked up even though the etasu is empty? How do I add a prescription that isn't a REMS drug to the DB to test this part out?

Yeah, the behavior you described above is accurate. To add a prescription that isn't a REMS drug I think you can copy/paste a JSON file in test-ehr

e.g. https://github.com/mcode/test-ehr/blob/dev/fhirResourcesToLoad/rems_snow_medicationrequest_addyi.json

then do gradle loadData while gradle bootRun is running in a different window, and then you should be able to see the list of MedicationRequests (at least for Jon Snow) if you click the refresh button in request-generator (I think for rems-smart-on-fhir that may have to be a hard reload)

Although if you were to add a REMS drug with ETASU then that'd require modifying the backend/src/database/data.js (that I added in this PR, although I wasn't sure whether to make a whole new file like the data.js or reuse the env.json for people who wanted to still use environment variables)

Thanks! I pulled the latest and got it working!

@jtquach1 jtquach1 merged commit a558758 into dev Apr 23, 2024
@jtquach1 jtquach1 deleted the support-medications-with-no-rems branch April 23, 2024 18:24
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