[613] | 1 | SDAMBAE6 ;ALB/MJK - A/E Protocol; 11 FEB 1993 10:00 am
|
---|
| 2 | ;;5.3;Scheduling;**27,132,76**;08/13/93
|
---|
| 3 | ;; ;
|
---|
| 4 | EN ; -- AE entry point for SDAM ADD EDIT protocol
|
---|
| 5 | ; - assumes SDAMTYP, SDBEG and SDEND defined from appt mgt
|
---|
| 6 | ; - assumes SDFN is defined if SDAMTYP="P"
|
---|
| 7 | ;
|
---|
| 8 | S VALMBCK=""
|
---|
| 9 | D FULL^VALM1
|
---|
| 10 | S DFLG=0 I SDAMTYP="P" S DFN=SDFN D 2^VADPT I +VADM(6) D Q:DFLG
|
---|
| 11 | . I SDBEG>+VADM(6) W VADM(7) S DFLG=1 R ZX:10
|
---|
| 12 | D FREE($S(SDAMTYP="P":SDFN,1:""))
|
---|
| 13 | ENQ Q
|
---|
| 14 | ;
|
---|
| 15 | EN1 ; -- AE entry point for SDCO ADD EDIT NEW protocol
|
---|
| 16 | ; - assumes SDBEG and SDEND defined from co mgt
|
---|
| 17 | N SDOE0
|
---|
| 18 | S VALMBCK=""
|
---|
| 19 | D FULL^VALM1
|
---|
| 20 | S SDOE0=$G(^SCE(+$G(SDOE),0))
|
---|
| 21 | D FREE(+$P(SDOE0,U,2))
|
---|
| 22 | ENQ1 Q
|
---|
| 23 | ;
|
---|
| 24 | EN2 ; -- AE entry point for SDADDEDIT option
|
---|
| 25 | S SDVISIT=$$ENCEDIT^PXAPI("ADDEDIT","SD","PIMS","","","","","PO",-1,"AD",1)
|
---|
| 26 | I +SDVISIT<-1 W !!,$P(SDVISIT,U,2)
|
---|
| 27 | ENQ2 Q
|
---|
| 28 | ;
|
---|
| 29 | FREE(SDFN) ; -- ask to create a standalone stop
|
---|
| 30 | N SDVISIT
|
---|
| 31 | IF SDFN D
|
---|
| 32 | . S SDVISIT=$$ENCEDIT^PXAPI("ADDEDIT","SD","PIMS",SDFN,SDBEG,SDEND,"","PO",-1,"AD",1)
|
---|
| 33 | ELSE D
|
---|
| 34 | . S SDVISIT=$$ENCEDIT^PXAPI("ADDEDIT","SD","PIMS","",SDBEG,SDEND,"","PO",-1,"AD",1)
|
---|
| 35 | I +SDVISIT<-1 W !!,$P(SDVISIT,U,2)
|
---|
| 36 | S VALMBCK="R"
|
---|
| 37 | ;
|
---|
| 38 | FREEQ Q
|
---|
| 39 | ;
|
---|