Created
October 11, 2018 22:20
-
-
Save sultanshakir/732fda7945335685eab552999dfffefa to your computer and use it in GitHub Desktop.
Find FIN from PersonID and EncounterID
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
| drop program sshakir_find_fin go | |
| create program sshakir_find_fin | |
| prompt | |
| "Output to File/Printer/MINE" = "MINE" | |
| , "Person Id:" = 0 | |
| , "Encounter Id:" = 0 | |
| with OUTDEV, PERSONID, ENCNTRID | |
| SELECT into $outdev | |
| Fin = EA.ALIAS | |
| FROM | |
| ENCNTR_ALIAS EA, | |
| ENCOUNTER E | |
| PLAN E | |
| WHERE E.person_id = $PERSONID ;can be $2 since it is 2nd prompt | |
| JOIN EA WHERE EA.encntr_id = $ENCNTRID | |
| WITH MAXREC = 100, NOCOUNTER, SEPARATOR=" ", FORMAT, TIME = 30 | |
| end | |
| go | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment