AGGEXPRT ;VNGT/HS/ALA-Set up for interfaces/exports ; 03 Nov 2010 8:55 AM
;;1.0;PATIENT REGISTRATION GUI;;Nov 15, 2010
;
;
ADD(AGGDFN) ;PEP - Add a new patient
NEW AGERR
I $$AGE^AGGAGE(AGGDFN)<3,('$$DECEASED^AGEDERR2(AGGDFN)) D AUTOADD^BIPATE(AGGDFN,DUZ(2),.AGERR,"")
;
I '$$PATCH^XPDUTL("AG*7.1*9") D
. S ^XTMP("AGHL7",AGGDFN)=AGGDFN
. S ^XTMP("AGHL7AG",AGGDFN,"REGISTER")=""
I $$PATCH^XPDUTL("AG*7.1*9") D
. S ^XTMP("AGHL7",DUZ(2),AGGDFN)=AGGDFN
. S ^XTMP("AGHL7AG",DUZ(2),AGGDFN,"REGISTER")=""
Q
;
EDIT(AGGDFN) ;PEP - Edit a patient
NEW AGERR
I $$AGE^AGGAGE(AGGDFN)<3,('$$DECEASED^AGEDERR2(AGGDFN)) D AUTOADD^BIPATE(AGGDFN,DUZ(2),.AGERR,"")
;
I '$$PATCH^XPDUTL("AG*7.1*9") D
. S ^XTMP("AGHL7",AGGDFN)=AGGDFN
. S ^XTMP("AGHL7AG",AGGDFN,"UPDATE")=""
I $$PATCH^XPDUTL("AG*7.1*9") D
. S ^XTMP("AGHL7",DUZ(2),AGGDFN)=AGGDFN
. S ^XTMP("AGHL7AG",DUZ(2),AGGDFN,"UPDATE")=""
;
D AG^AGHL7
Q
;
DEL(AGGDFN) ;PEP - Delete a patient
I '$$PATCH^XPDUTL("AG*7.1*9") D
. K ^XTMP("AGHL7",AGGDFN)
. K ^XTMP("AGHL7AG",AGGDFN)
I $$PATCH^XPDUTL("AG*7.1*9") D
. K ^XTMP("AGHL7",DUZ(2),AGGDFN)
. K ^XTMP("AGHL7AG",DUZ(2),AGGDFN)
;
NEW DIK,DA
S DIK="^BIP(",DA=AGGDFN D ^DIK
Q
AGGEXPRT ;VNGT/HS/ALA-Set up for interfaces/exports ; 03 Nov 2010 8:55 AM
+1 ;;1.0;PATIENT REGISTRATION GUI;;Nov 15, 2010
+2 ;
+3 ;
ADD(AGGDFN) ;PEP - Add a new patient
+1 NEW AGERR
+2 IF $$AGE^AGGAGE(AGGDFN)<3
IF ('$$DECEASED^AGEDERR2(AGGDFN))
DO AUTOADD^BIPATE(AGGDFN,DUZ(2),.AGERR,"")
+3 ;
+4 IF '$$PATCH^XPDUTL("AG*7.1*9")
Begin DoDot:1
+5 SET ^XTMP("AGHL7",AGGDFN)=AGGDFN
+6 SET ^XTMP("AGHL7AG",AGGDFN,"REGISTER")=""
End DoDot:1
+7 IF $$PATCH^XPDUTL("AG*7.1*9")
Begin DoDot:1
+8 SET ^XTMP("AGHL7",DUZ(2),AGGDFN)=AGGDFN
+9 SET ^XTMP("AGHL7AG",DUZ(2),AGGDFN,"REGISTER")=""
End DoDot:1
+10 QUIT
+11 ;
EDIT(AGGDFN) ;PEP - Edit a patient
+1 NEW AGERR
+2 IF $$AGE^AGGAGE(AGGDFN)<3
IF ('$$DECEASED^AGEDERR2(AGGDFN))
DO AUTOADD^BIPATE(AGGDFN,DUZ(2),.AGERR,"")
+3 ;
+4 IF '$$PATCH^XPDUTL("AG*7.1*9")
Begin DoDot:1
+5 SET ^XTMP("AGHL7",AGGDFN)=AGGDFN
+6 SET ^XTMP("AGHL7AG",AGGDFN,"UPDATE")=""
End DoDot:1
+7 IF $$PATCH^XPDUTL("AG*7.1*9")
Begin DoDot:1
+8 SET ^XTMP("AGHL7",DUZ(2),AGGDFN)=AGGDFN
+9 SET ^XTMP("AGHL7AG",DUZ(2),AGGDFN,"UPDATE")=""
End DoDot:1
+10 ;
+11 DO AG^AGHL7
+12 QUIT
+13 ;
DEL(AGGDFN) ;PEP - Delete a patient
+1 IF '$$PATCH^XPDUTL("AG*7.1*9")
Begin DoDot:1
+2 KILL ^XTMP("AGHL7",AGGDFN)
+3 KILL ^XTMP("AGHL7AG",AGGDFN)
End DoDot:1
+4 IF $$PATCH^XPDUTL("AG*7.1*9")
Begin DoDot:1
+5 KILL ^XTMP("AGHL7",DUZ(2),AGGDFN)
+6 KILL ^XTMP("AGHL7AG",DUZ(2),AGGDFN)
End DoDot:1
+7 ;
+8 NEW DIK,DA
+9 SET DIK="^BIP("
SET DA=AGGDFN
DO ^DIK
+10 QUIT