-
Notifications
You must be signed in to change notification settings - Fork 259
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
(feat) O3-4444: Map 'Start date' in drug order form to dateActivated
#2241
base: main
Are you sure you want to change the base?
Conversation
Size Change: +87 B (0%) Total Size: 16.3 MB ℹ️ View Unchanged
|
startDate: Date | string; | ||
durationUnit: DurationUnit; | ||
commonMedicationName: string; | ||
dateActivated: Date | string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apologies from the diff noise from reordering these properties alphabetically. The key change here is renaming this property from startDate
to dateActivated
.
asNeededCondition: medication.asNeededCondition, | ||
careSetting: medication.careSetting?.uuid, | ||
commonMedicationName: medication.drug?.display, | ||
dateActivated: new Date(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the key change, renaming this property from startDate
to dateActivated
.
asNeededCondition: medication.asNeededCondition, | ||
careSetting: medication.careSetting?.uuid, | ||
commonMedicationName: medication.drug?.display, | ||
dateActivated: medication?.dateActivated, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Key change: renaming this property from startDate
to dateActivated
and setting it's value to the existing medication's dateActivated
property.
commonMedicationName: drug.display, | ||
isFreeTextDosage: false, | ||
patientInstructions: '', | ||
dateActivated: new Date(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the key change: renaming this property from startDate
to dateActivated
.
…ivated` This PR makes the following changes to the medications app: - Maps the `startDate` field to the `dateActivated` property in the drug order form. Previously, the payload sent to the Order resource in the backend when creating a new drug order or editing an existing one was missing the `dateActivated` property. This meant that the backend wound up setting the `dateActivated` property to the current date and time. This is especially problematic when editing an existing order, as the current date was being used as the `dateActivated` property. This PR fixes this issue by mapping the `startDate` field to the `dateActivated` property and having its value default to the current date and time for new orders, and using the existing value for existing orders. - Amends the "Start date" field in the drug order form to read "Activation date" instead of "Start date". - Amends the "Start date" column header in the medications details table to read "Activation date" instead of "Start date".
95bf6b6
to
b6e77ca
Compare
Requirements
Summary
This PR makes the following changes to the medications app:
startDate
field to thedateActivated
property in the drug order form. Previously, the payload sent to the Order resource in the backend when creating a new drug order or editing an existing one was missing thedateActivated
property. This meant that the backend wound up setting thedateActivated
property to the current date and time. This is especially problematic when editing an existing order, as the current date was being used as thedateActivated
property. This PR fixes this issue by mapping thestartDate
field to thedateActivated
property and having its value default to the current date and time for new orders, and using the existing value for existing orders.Screenshots
Related Issue
Other