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

ACMCTRL.m

Go to the documentation of this file.
ACMCTRL ; IHS/TUCSON/TMJ - REGISTER CONTROL ; [ 02/10/2009  9:45 AM ]
 ;;2.0;ACM CASE MANAGEMENT SYSTEM;**4,8**;JAN 10, 1996
 ;CONTROLS WHICH DATA TYPES ARE INCLUDED FOR REGISTER
 ;ACMCRTL  = DATA TYPES OVERALL
 ;ACMCTRLE = TYPES FOR PATIENT EDIT
 ;ACMCTRLS = TYPES FOR REGISTER SYSTEM EDIT
 ;ACMCTRLP = TYPES TO PRINT REGISTER SPECIFIC PATIENT REPORTS
 ;ACMCTRLX = TYPES TO PRINT REGISTER REPORTS
EN ;PEP - get register data
 K ACMCTRL,ACMCTRLE,ACMCTRLP,ACMCTRLS,ACMCTRLX
 D CONTROL,SET,EXIT
 Q
 ;
EXIT F ACMX="","E","S","P","X" S ACMZZZ=@("ACMCTRL"_ACMX) I ACMZZZ[";;" S ACMZZZ=$P(ACMZZZ,";;")_";"_$P(ACMZZZ,";;",2),@("ACMCTRL"_ACMX)=ACMZZZ
 K ACMES,ACMEP,ACMPS,ACMPP,ACMX,ACMY,ACMZ,ACMZZ,ACMZZZ
 Q
 ;
CONTROL ;PEP - register setup?
 I '$D(^ACM(41.1,ACMRG,0)) W *7,!!?10,"This register is not properly configured.",!?10,"Contact the Case Management Systems manager for assistance." R !!,"Strike <CR> to continue. ",ACMX:DTIME S ACMQUIT="" Q
 S ACMX=""
 F ACMI=0:0 S ACMX=$O(^ACM(41.1,ACMRG,2,"B",ACMX)) Q:ACMX=""  S ACMZ=$P(^ACM(56,ACMX,0),U,3),ACMZ(ACMZ)=""
 K ACMI
 S (ACMCTRL,ACMY)=""
 F ACMI=0:0 S ACMY=$O(ACMZ(ACMY)) Q:ACMY=""  S ACMZZ=$O(^ACM(56,"C",ACMY,"")) S ACMCTRL=ACMCTRL_";"_$P(^ACM(56,ACMZZ,0),U,2)
 K ACMI
 S:$E(ACMCTRL,$L(ACMCTRL))'=";" ACMCTRL=ACMCTRL_";"
 Q
 ;
SET S ACMCTRL1=ACMCTRL
 F ACMI="ESDT","EPDT" S ACMCTRL=ACMCTRL1 D @ACMI
 K ACMI,ACMCTRL1
 S ACMCTRLS=ACMCTRLS_";AD",ACMCTRLE=ACMCTRLE_";AD"
 Q
 ;
ESDT I ACMCTRL["CMGT" S ACMCTRL=$P(ACMCTRL,";CMGT")_$P(ACMCTRL,"CMGT",2,99) ;IHS/CIM/THL PATCH 4
 I ACMCTRL["REG" S ACMCTRL=$P(ACMCTRL,";REG")_$P(ACMCTRL,"REG",2,99)
 I ACMCTRL["DX" S ACMCTRL=$P(ACMCTRL,"DX")_"DXL"_$P(ACMCTRL,"DX",2,99)
 I ACMCTRL["ET" S ACMCTRL=$P(ACMCTRL,"ET")_"ETL"_$P(ACMCTRL,"ET",2,99)
 I ACMCTRL["DC" S ACMCTRL=$P(ACMCTRL,"DC")_"DCL"_$P(ACMCTRL,"DC",2,99)
 I ACMCTRL["CMP" S ACMCTRL=$P(ACMCTRL,"CMP")_"CMPL"_$P(ACMCTRL,"CMP",2,99)
 I ACMCTRL["RF" S ACMCTRL=$P(ACMCTRL,"RF")_"RFL"_$P(ACMCTRL,"RF",2,99)
 I ACMCTRL["AP;" S ACMCTRL=$P(ACMCTRL,"AP;")_"APL;"_$P(ACMCTRL,"AP;",2,99)
 I ACMCTRL["SV" S ACMCTRL=$P(ACMCTRL,"SV")_"SVL"_$P(ACMCTRL,"SV",2,99)
 I ACMCTRL["MD" S ACMCTRL=$P(ACMCTRL,"MD")_"MDL"_$P(ACMCTRL,"MD",2,99)
 I ACMCTRL["PROB" S ACMCTRL=$P(ACMCTRL,";PROB")_$P(ACMCTRL,";PROB",2,99)
 I ACMCTRL["APPT" S ACMCTRL=$P(ACMCTRL,";APPT")_$P(ACMCTRL,";APPT",2,99)
 I ACMCTRL["CT" S ACMCTRL=$P(ACMCTRL,";CT")_$P(ACMCTRL,";CT",2,99)
 I ACMCTRL["FM" S ACMCTRL=$P(ACMCTRL,";FM")_$P(ACMCTRL,";FM",2,99)
 I ACMCTRL["CR" S ACMCTRL=$P(ACMCTRL,";CR")_$P(ACMCTRL,";CR",2,99)
 I ACMCTRL["CP" S ACMCTRL=$P(ACMCTRL,";CP")_$P(ACMCTRL,";CP",2,99)
 I ACMCTRL["CH",ACMCTRL'["DML" S ACMCTRL=$P(ACMCTRL,";CH")_$P(ACMCTRL,";CH",2,99)_""
 I ACMCTRL["MEAS" S ACMCTRL=$P(ACMCTRL,"MEAS")_"MEAS"_$P(ACMCTRL,"MEAS",2,99)
 ;I ACMCTRL'["RD" S ACMCTRL=ACMCTRL_"RD;"
 I ACMCTRL["RD",ACMCTRL'["SV" S ACMCTRL=ACMCTRL_"SVL;"
 S:$E(ACMCTRL)=";" ACMCTRL=$P(ACMCTRL,";",2,999)
 S:$E(ACMCTRL,$L(ACMCTRL))=";" ACMCTRL=$E(ACMCTRL,1,$L(ACMCTRL)-1)
 S (ACMCTRLS,ACMCTRLX)=ACMCTRL
 S ACMCTRLS=$P(ACMCTRLS,";MEAS")_$P(ACMCTRLS,";MEAS",2,99)
 ;S ACMCTRLS=$P(ACMCTRLS,";APPT")_$P(ACMCTRLS,";APPT",2,99)
 S ACMCTRLS=$P(ACMCTRLS,";CH")_$P(ACMCTRLS,";CH",2,99)
 S:ACMCTRLS[";DC;" ACMCTRLS=$P(ACMCTRLS,";DC;")_";DCL;"_$P(ACMCTRLS,";DC;",2,99)
 Q
 ;
EPDT I ACMCTRL'["REG" S ACMCTRL=";REG;"_ACMCTRL
 I ACMCTRL'["CR" S ACMCTRL=ACMCTRL_"CR;"
 I ACMCTRL["RD",ACMCTRL'["SV" S ACMCTRL=ACMCTRL_"SV;"
 S:$E(ACMCTRL)=";" ACMCTRL=$P(ACMCTRL,";",2,999)
 S:$E(ACMCTRL,$L(ACMCTRL))=";" ACMCTRL=$E(ACMCTRL,1,$L(ACMCTRL)-1)
 S (ACMCTRLE,ACMCTRLP)=ACMCTRL
 ;S:ACMCTRLP'["APPL" ACMCTRLP=$P(ACMCTRLP,";APPT")_";APPT"_$P(ACMCTRL,";APPT",2)
 I ACMCTRLP["PROB",$P(^ACM(41.1,ACMRG,0),U,10)=0 S ACMCTRLP=$P(ACMCTRLP,"PROB;",2)
 Q