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

NIAD-3170: Set effective end date to start date in generated MedicationStatement when status is active when mapping acute plans. #877

Merged
merged 2 commits into from
Oct 17, 2024

Conversation

MartinWheelerMT
Copy link
Collaborator

What

  • Add unit tests to ensure that the generated MedicationStatement has an effective.end set to the value of effective.start when the status is active and associated Order has no dispenseRequest.validityPeriod.end.
  • Add unit tests to assert the current behaviour depending on the MedicationStatement.status
  • Add functionality to MedicationRequestMapper for the above.
  • Update integration test files to now test that the end value is correctly populated.

Why

Currently we only set effective.start value when generating a MedicationStatement whilst mapping an acute plan where multiple ehrSupplyPrescribe reference a single acute ehrSupplyAuthorise, whilst when building new MedicationStatements we also set end to the same value as start when status is active and the is not a end value provided.

This change is to ensure the functionality remains consistent.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I have performed a self-review of my code
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

…ionStatement` when status is `active` when mapping acute plans.

* Add unit tests to ensure that the generated `MedicationStatement` has an `effective.end` set to the value of `effective.start` when the status is `active` and associated `Order` has no `dispenseRequest.validityPeriod.end`.
* Add unit tests to assert the current behaviour depending on the `MedicationStatement.status`
* Add functionality to `MedicationRequestMapper` for the above.
* Update integration test files to now test that the `end` value is correctly populated.
@MartinWheelerMT MartinWheelerMT enabled auto-merge (squash) October 15, 2024 15:42
@MartinWheelerMT MartinWheelerMT merged commit a962153 into main Oct 17, 2024
1 check passed
@MartinWheelerMT MartinWheelerMT deleted the niad-3170-add-effective-period-end-handing branch October 17, 2024 09:34
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.

2 participants