SDCO31 ;ALB/RMO - Provider Cont. - Check Out;19 MAR 1993 9:04 am
;;5.3;Scheduling;**41**;AUG 13, 1993
;
PRHLP(SDCL) ;Provider Help for Clinic
; Input -- SDCL Hospital Location file IEN
; Output -- Help
N C,I,SDNPI
I '$O(^SC(SDCL,"PR",0)) G PRHLPQ
W !!,"The following providers are associated with ",$$LOWER^VALM1($P($G(^SC(SDCL,0)),"^")),":"
W !!,"Default Provider: ",$S($$PRDEF(SDCL)]"":$$PRDEF(SDCL),1:"[None]")
W !!,"Other providers: "
S (C,I)=0 F S I=$O(^SC(SDCL,"PR",I)) Q:'I I $D(^(I,0)) S SDNPI=+^(0) I '$D(^SC("ADPR",SDCL,I)) D
.S C=C+1
.W:C=1 !
.D PAUSE^VALM1:'(C#15) W !,$$PR(SDNPI)
W:'C "None"
PRHLPQ Q
;
PRDEF(SDCL) ;Provider Default for Clinic
; Input -- SDCL Hospital Location file IEN
; IF DEFINED: DFN - ptr to PATIENT File
; Output -- Default
N Y,X
I $D(^SC("ADPR",SDCL)),$D(^SC(SDCL,"PR",+$O(^(SDCL,0)),0)) S Y=$$PR(+^(0))
S:($G(Y)="")&($G(^SC(SDCL,"PC")))&($D(DFN)) Y=$P($$NMPCPR^SCAPMCU2(DFN,DT,1),U,2)
Q $G(Y)
;
PR(SDNPI) ;Provider Display Data
; Input -- SDNPI New Person IEN
; Output -- Provider Display Data - Provider Name
N Y
S Y=$S($D(^VA(200,SDNPI,0)):$P(^(0),"^"),1:"Unknown")
Q $G(Y)
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSDCO31 1191 printed Nov 22, 2024@17:59:25 Page 2
SDCO31 ;ALB/RMO - Provider Cont. - Check Out;19 MAR 1993 9:04 am
+1 ;;5.3;Scheduling;**41**;AUG 13, 1993
+2 ;
PRHLP(SDCL) ;Provider Help for Clinic
+1 ; Input -- SDCL Hospital Location file IEN
+2 ; Output -- Help
+3 NEW C,I,SDNPI
+4 IF '$ORDER(^SC(SDCL,"PR",0))
GOTO PRHLPQ
+5 WRITE !!,"The following providers are associated with ",$$LOWER^VALM1($PIECE($GET(^SC(SDCL,0)),"^")),":"
+6 WRITE !!,"Default Provider: ",$SELECT($$PRDEF(SDCL)]"":$$PRDEF(SDCL),1:"[None]")
+7 WRITE !!,"Other providers: "
+8 SET (C,I)=0
FOR
SET I=$ORDER(^SC(SDCL,"PR",I))
if 'I
QUIT
IF $DATA(^(I,0))
SET SDNPI=+^(0)
IF '$DATA(^SC("ADPR",SDCL,I))
Begin DoDot:1
+9 SET C=C+1
+10 if C=1
WRITE !
+11 if '(C#15)
DO PAUSE^VALM1
WRITE !,$$PR(SDNPI)
End DoDot:1
+12 if 'C
WRITE "None"
PRHLPQ QUIT
+1 ;
PRDEF(SDCL) ;Provider Default for Clinic
+1 ; Input -- SDCL Hospital Location file IEN
+2 ; IF DEFINED: DFN - ptr to PATIENT File
+3 ; Output -- Default
+4 NEW Y,X
+5 IF $DATA(^SC("ADPR",SDCL))
IF $DATA(^SC(SDCL,"PR",+$ORDER(^(SDCL,0)),0))
SET Y=$$PR(+^(0))
+6 if ($GET(Y)="")&($GET(^SC(SDCL,"PC")))&($DATA(DFN))
SET Y=$PIECE($$NMPCPR^SCAPMCU2(DFN,DT,1),U,2)
+7 QUIT $GET(Y)
+8 ;
PR(SDNPI) ;Provider Display Data
+1 ; Input -- SDNPI New Person IEN
+2 ; Output -- Provider Display Data - Provider Name
+3 NEW Y
+4 SET Y=$SELECT($DATA(^VA(200,SDNPI,0)):$PIECE(^(0),"^"),1:"Unknown")
+5 QUIT $GET(Y)