Created
October 4, 2024 04:53
-
-
Save ir4y/a6bfe5c27a9a84e4cd3259c10da5dfb6 to your computer and use it in GitHub Desktop.
Example of precompiled fhirpath utils
This file contains hidden or 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
| function compile<SRC extends Resource,DST = any>(expression:string){ | |
| const path = fhirpath.compile(expression); | |
| return (s:SRC) => path(s) as Array<DST>; | |
| } | |
| const vmoName = compile<Appointment,string>("Appointment.participant.where('22232009' in type.coding.code).actor.display"); | |
| const vmoStaus = compile<Appointment,string>("Appointment.participant.where('22232009' in type.coding.code).status"); | |
| ... | |
| const columns =[ | |
| { | |
| title: 'Hospital', | |
| key: 'Hospital', | |
| render: with_status(vmoName,vmoStaus), | |
| }, | |
| ]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment