source: FOIAVistA/trunk/r/SURGERY-SR/SROA38A.m@ 1274

Last change on this file since 1274 was 628, checked in by George Lilly, 15 years ago

initial load of FOIAVistA 6/30/08 version

File size: 2.1 KB
Line 
1SROA38A ;BIR/ADM-Preinitialization Process for SR*3*38 ; [ 05/18/95 1:50 PM ]
2 ;;3.0; Surgery ;**38**;24 Jun 93
3 I $G(SR38DONE) G END
4LOOP ; loop through each case and update anesthesia techniques to ABA list
5 W !!,"Converting anesthesia techniques..." S (CNT,SRTN)=0
6 F S SRTN=$O(^SRF(SRTN)) Q:'SRTN S CNT=CNT+1 W:'(CNT#100) "." I $O(^SRF(SRTN,6,0)) S SRANES=0 F S SRANES=$O(^SRF(SRTN,6,SRANES)) Q:'SRANES S X=$P($G(^SRF(SRTN,6,SRANES,0)),"^") I X'="" D
7 .S SRCASE=SRTN_"^"_SRANES_"^"_X
8 .S SRFLG=0 F SRTECH="INH","IV","S","E","INF","N","F","T","O" I X=SRTECH S SRFLG=1 Q
9 .I 'SRFLG,$D(SRATECH(X)) D ALTER Q
10 .I 'SRFLG D NONSTD Q
11 .I X="E"!(X="S") Q
12 .I X="INH" S Y="G" D SET Q
13 .I X="IV" S MAC=$P($G(^SRF(SRTN,6,SRANES,8)),"^") S Y=$S(MAC="Y":"M",1:"G") D SET Q
14 .S Z=$P($G(^SRF(SRTN,.3)),"^",8),CAT=$S(Z="A":1,Z="N":1,1:0)
15 .I X="INF"!(X="N")!(X="F")!(X="T")!(X="O") S Y=$S(CAT:"O",1:"L") D SET
16 W !,"Conversion of anesthesia techniques is finished.",!
17STATUS ; change assessments with a status of COMPLETE to INCOMPLETE
18 F SRS="C","N" S DFN=0 F S DFN=$O(^SRF("ARS",SRS,"C",DFN)) Q:'DFN S SRTN=0 F S SRTN=$O(^SRF("ARS",SRS,"C",DFN,SRTN)) Q:'SRTN D
19 .I $P($G(^SRF(SRTN,"RA")),"^",6)="N" Q
20 .K ^SRF("ARS",SRS,"C",DFN,SRTN),DA,DIE,DR S DA=SRTN,DIE=130,DR="235////I;272///@" D ^DIE
21DELDD ; delete DD for modified fields
22 K DIE,DR,DIK,DA S DIK="^DD(130,",DA(1)=130 F DA=102,218,235,256,259,287,339,340,404,411 D ^DIK
23 K DIK,DA
24 ; delete DD's of sub-files with changed names
25 F SRSUB=130.053,130.534,130.0126,130.13,130.21,130.22,130.224 K DIU S DIU=SRSUB,DIU(0)="S" D EN^DIU2
26 K SRSUB,DIU
27 ; delete occurrence categories in file 136.5
28END K ^SRO(136.5)
29 W !!,"Preinit process is finished.",! K CAT,CNT,DFN,I,MAC,SR38DONE,SRA,SRANES,SRATECH,SRCASE,SRFLG,SRNON,SRS,SRSOUT,SRTECH,SRTN,SRW,SRX,SRX1,SRY,SRZ,X,Y,Z
30 Q
31SET S $P(^SRF(SRTN,6,SRANES,0),"^")=Y
32 Q
33NONSTD ; convert non-standard anesthesia technique
34 S Z=$P($G(^SRF(SRTN,.3)),"^",8),CAT=$S(Z="A":1,Z="N":1,1:0),Y=$S(CAT:"O",1:"L")
35 W !!,"Non-standard technique code "_X_" on case #"_SRTN_" converted to "_$S(Y="O":"OTHER",1:"LOCAL")_".",!
36 D SET
37 Q
38ALTER S Y=SRATECH(X) D SET
39 Q
Note: See TracBrowser for help on using the repository browser.