SRTPHRT2 ;BIR/SJA - HEART-DIAGNOSIS INFORMATION ;03/04/08
;;3.0;Surgery;**167,175**;24 Jun 93;Build 6
I '$D(SRTPP) W !!,"A Transplant Assessment must be selected prior to using this option.",!!,"Press <RET> to continue " R X:DTIME G END
START Q:SRSOUT D DISP
W !!,"Select Transplant Information to Edit: " R X:DTIME I '$T!(X["^") S SRSOUT=1 G END
I X="" D ^SRTPHRT3 G END
S:X="a" X="A" I '$D(SRAO(X)),(X'?.N1":".N),(X'="A") D HELP G:SRSOUT END G START
I X?1.2N1":"1.2N S Y=$P(X,":"),Z=$P(X,":",2) I Y<1!(Z>SRX)!(Y>Z) D HELP G:SRSOUT END G START
I X="A" S X="1:"_SRX
D HDR^SRTPUTL
I X?.N1":".N D RANGE G START
I $D(SRAO(X)) S SREMIL=X W !! D ONE G START
END W @IOF
Q
HELP W @IOF,!!!!,"Enter the number or range of numbers you want to edit. Examples of proper",!,"responses are listed below."
W !!,"1. Enter 'A' to update all information.",!!,"2. Enter a number (1-"_SRX_") to update the information in that field. (For",!," example, enter '3' to update Ischemic Cardiomyopathy.)"
W !!,"3. Enter a range of numbers (1-"_SRX_") separated by a ':' to enter a range",!," of items. (For example, enter '1:4' to update items 1, 2, 3 and 4.)",!
W !!,"Press <RET> to continue, or '^' to quit " R X:DTIME I '$T!(X["^") S SRSOUT=1
Q
RANGE ; range of numbers
W !! S SRNOMORE=0,SRSHEMP=$P(X,":"),SRCURL=$P(X,":",2) F SREMIL=SRSHEMP:1:SRCURL Q:SRNOMORE D ONE
Q
ONE ; edit one item
K DR,DIE S DA=SRTPP,DR=$P(SRAO(SREMIL),"^",2)_"T",DIE=139.5 D ^DIE K DR I $D(Y) S SRNOMORE=1
Q
DISP ; display fields
S SRPAGE="PAGE: 2 OF "_$S(SRNOVA:6,1:4),SRHPG="TRANSPLANT INFORMATION" D HDR^SRTPUTL
K SRAO,DR S SRQ=0
S SRDR="155;156;157;158;159;43;160;161;162;94;112;13;14;15;16;17;18"
K DA,DIC,DIQ,SRX,SRY S DIC="^SRT(",DA=SRTPP,DIQ="SRY",DIQ(0)="E",DR=SRDR D EN^DIQ1 K DA,DIC,DIQ,DR
S (SRX,SRZ)=0 F I=1:1 S SRZ=$P(SRDR,";",I) Q:'SRZ S SRX=I,SRAO(I)=SRY(139.5,SRTPP,SRZ,"E")_"^"_SRZ
W !,"Recipient Diagnosis",?39,"HLA Typing (#,#,#,#)"
W !,"==================================",?39,"===================="
W !,"1. Dilated Cardiomyopathy:",?31,$P(SRAO(1),"^"),?39,"12. Recipient HLA-A: ",$P(SRAO(12),"^")
W !,"2. Coronary Artery Disease:",?31,$P(SRAO(2),"^"),?39,"13. Recipient HLA-B: ",$P(SRAO(13),"^")
W !,"3. Ischemic Cardiomyopathy:",?31,$P(SRAO(3),"^"),?39,"14. Recipient HLA-C: ",$P(SRAO(14),"^")
W !,"4. Alcoholic Cardiomyopathy:",?31,$P(SRAO(4),"^"),?39,"15. Recipient HLA-BW: ",$P(SRAO(15),"^")
W !,"5. Valvular Cardiomyopathy:",?31,$P(SRAO(5),"^"),?39,"16. Recipient HLA-DR: ",$P(SRAO(16),"^")
W !,"6. Sarcoidosis:",?31,$P(SRAO(6),"^"),?39,"17. Recipient HLA-DQ: ",$P(SRAO(17),"^")
W !,"7. Idiopathic Cardiomyopathy:",?31,$P(SRAO(7),"^")
W !,"8. Viral Cardiomyopathy:",?31,$P(SRAO(8),"^")
W !,"9. Peripartum Cardiomyopathy:",?31,$P(SRAO(9),"^")
W !,"10. Rejection:",?31,$P(SRAO(10),"^")
W !,"11. Other Cardiomyopathy:" S SREXT=$P(SRAO(11),"^") D COMM
W !!,SRLINE
Q
COMM ; Other Cardiomyopathy
I $L(SREXT)<52 W ?27,SREXT Q
N I,J,X,Y S X=SREXT F D W:$L(X) ! I $L(X)<52!($L(X)>51&(X'[" ")) W ?27,X Q
.F I=0:1:50 S J=51-I,Y=$E(X,J) I Y=" " W ?27,$E(X,1,J-1) S X=$E(X,J+1,$L(X)) Q
Q
--- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSRTPHRT2 3177 printed Dec 13, 2024@02:48:15 Page 2
SRTPHRT2 ;BIR/SJA - HEART-DIAGNOSIS INFORMATION ;03/04/08
+1 ;;3.0;Surgery;**167,175**;24 Jun 93;Build 6
+2 IF '$DATA(SRTPP)
WRITE !!,"A Transplant Assessment must be selected prior to using this option.",!!,"Press <RET> to continue "
READ X:DTIME
GOTO END
START if SRSOUT
QUIT
DO DISP
+1 WRITE !!,"Select Transplant Information to Edit: "
READ X:DTIME
IF '$TEST!(X["^")
SET SRSOUT=1
GOTO END
+2 IF X=""
DO ^SRTPHRT3
GOTO END
+3 if X="a"
SET X="A"
IF '$DATA(SRAO(X))
IF (X'?.N1":".N)
IF (X'="A")
DO HELP
if SRSOUT
GOTO END
GOTO START
+4 IF X?1.2N1":"1.2N
SET Y=$PIECE(X,":")
SET Z=$PIECE(X,":",2)
IF Y<1!(Z>SRX)!(Y>Z)
DO HELP
if SRSOUT
GOTO END
GOTO START
+5 IF X="A"
SET X="1:"_SRX
+6 DO HDR^SRTPUTL
+7 IF X?.N1":".N
DO RANGE
GOTO START
+8 IF $DATA(SRAO(X))
SET SREMIL=X
WRITE !!
DO ONE
GOTO START
END WRITE @IOF
+1 QUIT
HELP WRITE @IOF,!!!!,"Enter the number or range of numbers you want to edit. Examples of proper",!,"responses are listed below."
+1 WRITE !!,"1. Enter 'A' to update all information.",!!,"2. Enter a number (1-"_SRX_") to update the information in that field. (For",!," example, enter '3' to update Ischemic Cardiomyopathy.)"
+2 WRITE !!,"3. Enter a range of numbers (1-"_SRX_") separated by a ':' to enter a range",!," of items. (For example, enter '1:4' to update items 1, 2, 3 and 4.)",!
+3 WRITE !!,"Press <RET> to continue, or '^' to quit "
READ X:DTIME
IF '$TEST!(X["^")
SET SRSOUT=1
+4 QUIT
RANGE ; range of numbers
+1 WRITE !!
SET SRNOMORE=0
SET SRSHEMP=$PIECE(X,":")
SET SRCURL=$PIECE(X,":",2)
FOR SREMIL=SRSHEMP:1:SRCURL
if SRNOMORE
QUIT
DO ONE
+2 QUIT
ONE ; edit one item
+1 KILL DR,DIE
SET DA=SRTPP
SET DR=$PIECE(SRAO(SREMIL),"^",2)_"T"
SET DIE=139.5
DO ^DIE
KILL DR
IF $DATA(Y)
SET SRNOMORE=1
+2 QUIT
DISP ; display fields
+1 SET SRPAGE="PAGE: 2 OF "_$SELECT(SRNOVA:6,1:4)
SET SRHPG="TRANSPLANT INFORMATION"
DO HDR^SRTPUTL
+2 KILL SRAO,DR
SET SRQ=0
+3 SET SRDR="155;156;157;158;159;43;160;161;162;94;112;13;14;15;16;17;18"
+4 KILL DA,DIC,DIQ,SRX,SRY
SET DIC="^SRT("
SET DA=SRTPP
SET DIQ="SRY"
SET DIQ(0)="E"
SET DR=SRDR
DO EN^DIQ1
KILL DA,DIC,DIQ,DR
+5 SET (SRX,SRZ)=0
FOR I=1:1
SET SRZ=$PIECE(SRDR,";",I)
if 'SRZ
QUIT
SET SRX=I
SET SRAO(I)=SRY(139.5,SRTPP,SRZ,"E")_"^"_SRZ
+6 WRITE !,"Recipient Diagnosis",?39,"HLA Typing (#,#,#,#)"
+7 WRITE !,"==================================",?39,"===================="
+8 WRITE !,"1. Dilated Cardiomyopathy:",?31,$PIECE(SRAO(1),"^"),?39,"12. Recipient HLA-A: ",$PIECE(SRAO(12),"^")
+9 WRITE !,"2. Coronary Artery Disease:",?31,$PIECE(SRAO(2),"^"),?39,"13. Recipient HLA-B: ",$PIECE(SRAO(13),"^")
+10 WRITE !,"3. Ischemic Cardiomyopathy:",?31,$PIECE(SRAO(3),"^"),?39,"14. Recipient HLA-C: ",$PIECE(SRAO(14),"^")
+11 WRITE !,"4. Alcoholic Cardiomyopathy:",?31,$PIECE(SRAO(4),"^"),?39,"15. Recipient HLA-BW: ",$PIECE(SRAO(15),"^")
+12 WRITE !,"5. Valvular Cardiomyopathy:",?31,$PIECE(SRAO(5),"^"),?39,"16. Recipient HLA-DR: ",$PIECE(SRAO(16),"^")
+13 WRITE !,"6. Sarcoidosis:",?31,$PIECE(SRAO(6),"^"),?39,"17. Recipient HLA-DQ: ",$PIECE(SRAO(17),"^")
+14 WRITE !,"7. Idiopathic Cardiomyopathy:",?31,$PIECE(SRAO(7),"^")
+15 WRITE !,"8. Viral Cardiomyopathy:",?31,$PIECE(SRAO(8),"^")
+16 WRITE !,"9. Peripartum Cardiomyopathy:",?31,$PIECE(SRAO(9),"^")
+17 WRITE !,"10. Rejection:",?31,$PIECE(SRAO(10),"^")
+18 WRITE !,"11. Other Cardiomyopathy:"
SET SREXT=$PIECE(SRAO(11),"^")
DO COMM
+19 WRITE !!,SRLINE
+20 QUIT
COMM ; Other Cardiomyopathy
+1 IF $LENGTH(SREXT)<52
WRITE ?27,SREXT
QUIT
+2 NEW I,J,X,Y
SET X=SREXT
FOR
Begin DoDot:1
+3 FOR I=0:1:50
SET J=51-I
SET Y=$EXTRACT(X,J)
IF Y=" "
WRITE ?27,$EXTRACT(X,1,J-1)
SET X=$EXTRACT(X,J+1,$LENGTH(X))
QUIT
End DoDot:1
if $LENGTH(X)
WRITE !
IF $LENGTH(X)<52!($LENGTH(X)>51&(X'[" "))
WRITE ?27,X
QUIT
+4 QUIT