Home   Package List   Routine Alphabetical List   Global Alphabetical List   FileMan Files List   FileMan Sub-Files List   Package Component Lists   Package-Namespace Mapping  
Routine: IBERSP1

IBERSP1.m

Go to the documentation of this file.
  1. IBERSP1 ;ALB/ARH - CREATE CHECK-OFF SHEET CPT LIST (CONTINUED) ; 11/5/91
  1. ;;Version 2.0 ; INTEGRATED BILLING ;; 21-MAR-94
  1. ;;Per VHA Directive 10-93-142, this routine should not be modified.
  1. ;
  1. ;continuation of COS print function: creates the preliminary forms that IBERSP then reformats and prints
  1. ;creates partially formated files that can then be reformated to fit any TOF to save time
  1. ;only called if these do not already exist ie. may not be called for every COS print
  1. ;external entry pt.
  1. CREATE ;create linear temp file of CPT's for GRP, array can be reused each time GRP is printed
  1. N GDATA,DC,LF,CW,PN,GPO,IFN,DATA,NAME,CODE,CD,CHG,CPO,PFN,IC,I,J,X,Y
  1. Q:'$D(^IBE(350.7,GRP,0))!('$D(^IBE(350.71,"AG",GRP)))
  1. S GDATA=^IBE(350.7,GRP,0),DC=$P(GDATA,"^",2),LF=$P(GDATA,"^",4),ADT=$S(+ADT:ADT,1:DT)
  1. S X=$$FORMAT^IBEFUNC2(GRP),IC=$P(X,"^",1),CW=$P(X,"^",2),PN=$P(X,"^",3)
  1. S ^TMP("IBRSC",$J,GRP,0)=$P(GDATA,"^",1),^TMP("IBRSC",$J,GRP)=$P(GDATA,"^",3)
  1. S GPO="" F I=1:1 S GPO=$O(^IBE(350.71,"AG",GRP,GPO)) Q:GPO="" S IFN=+$O(^IBE(350.71,"AG",GRP,GPO,"")) S DATA=$G(^IBE(350.71,IFN,0)) D:DATA'="" C1
  1. S X="" F Y=1:1:(CW-12) S X=X_"_"
  1. S X="OTHER PROC: "_X,J=0 D LINE
  1. Q
  1. ;
  1. C1 ;set GROUPs catigories and procedures into temp file
  1. S NAME=$E($P(DATA,"^",1),1,CW),CPO="",X=$J(NAME,CW/2+($L(NAME)/2)),J=0 D LINE
  1. F J=1:1 S CPO=$O(^IBE(350.71,"AS",IFN,CPO)) Q:CPO="" S PFN=+$O(^IBE(350.71,"AS",IFN,CPO,"")) S DATA=$G(^IBE(350.71,PFN,0)) D:DATA'="" C2
  1. Q
  1. ;
  1. C2 ;set each procedure into temp file
  1. S NAME=$E($P(DATA,"^",1),1,PN),NAME=NAME_$J("",(PN-$L(NAME))),CD=+$P(DATA,"^",6),CODE=$P($G(^ICPT(CD,0)),"^",1),CHG=""
  1. S:LF=1 X=CODE_" "_NAME S:LF'=1 X=NAME_" "_CODE
  1. I DC S CHG=$$CPTCHG^IBEFUNC1(CD,DIV,ADT),X=X_" "_$S(CHG="":$J(CHG,8),1:$J(CHG,8,2))
  1. S X=X_" ( )" D LINE
  1. Q
  1. ;
  1. LINE ;saves line in the linear temp file, padded depending on GRP format
  1. S ^TMP("IBRSC",$J,GRP,I,J)=$J("",IC)_X_$J("",(CW-$L(X)+IC))
  1. Q
  1. ;
  1. ;external entry pt.
  1. BOX ;create card box and header
  1. N CTR,IC,HLN,VLN,I,X
  1. S BOX=12,CTR=(IOM/2),IC=4 S ^TMP("IBRSC",$J,"B")=CTR
  1. S X=CTR-IC,HLN="" F I=1:1:X S HLN=HLN_"="
  1. S VLN=$J("",(CTR-2))_"||",HLN=$J("",IC)_HLN_$J("",IC) F I=1:1:BOX S ^TMP("IBRSC",$J,"B",I)=VLN_$J("",IC)
  1. S ^TMP("IBRSC",$J,"B",I+1)=HLN
  1. S ^(I)=^TMP("IBRSC",$J,"B",I)_"Date:",^(4)=^TMP("IBRSC",$J,"B",4)_$J("Ambulatory Surgery Check-Off Sheet",(CTR\2)+17)
  1. Q