; Check to see if provider is different than what is on file
; Input - DGMVMT = 0th node of last treating specialty
; DGPPROV = Primary Provider IFN
; DGAPROV = Attending Provider IFN
; Output - DGGO = Set if Primary/Attending is changing
EN
; Queue provider update to avoid problems with recursive calls
FMVMTQ
INPTCHK(DFN)
; Check to see if patient is a current inpatient
; Input - DFN = Patient IFN
; Output - 0 = Not a current inpatient
; number = internal file number of the admission movement
; Create new movement for provider change
; Input - DFN - Patient IFN
; DGMVMT - 0th node of last treating specialty
FMVMT
; Find the last movement
; Input - DGLSTM = The date/time passes in from OE/RR
; Output - DGMVMT = The 0th node of the last treating specialty
; DGMVT = The IFN of the last treating specialty
INITQ
EVT
; Create variables for DGPM event driver
; Input - DGMVT - IFN of ^DGPM
; Output - DGPMP - 0th node of prior update
; DGPMA - 0th node of after update
; Corresponding before/after ^UTILITY( global