-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added medication view to dashboard - Ref gestion-de-projet#2677
- Loading branch information
1 parent
3c73e9a
commit 5d63c1e
Showing
11 changed files
with
828 additions
and
36 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { ResourceType } from 'types/requestCriterias' | ||
import { Order } from 'types/searchCriterias' | ||
|
||
export const mapMedicationToOrderByCode = ( | ||
code: Order, | ||
resourceType: ResourceType.MEDICATION_REQUEST | ResourceType.MEDICATION_ADMINISTRATION | ||
) => { | ||
const dateName = { | ||
[ResourceType.MEDICATION_REQUEST]: Order.PERIOD_START, | ||
[ResourceType.MEDICATION_ADMINISTRATION]: Order.EFFECTIVE_TIME | ||
} | ||
|
||
return code === Order.PERIOD_START ? dateName[resourceType] : code | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.