Access to Global nodes to check patient status and get
type of movement
I '$D(^DGPM("C",DFN)) Check if inpatient/lodger
I $D(^DGPM(+DGPMVI(17),0)) Check if Discharge movement exists
Also the following access:
^DGPM(D0,0)
.04 TYPE OF MOVEMENT 0;1 Global r