- SRTPLUN1 ;BIR/SJA - LUNG-RECIPIENT INFORMATION ;03/04/08
- ;;3.0; Surgery ;**167**;24 Jun 93;Build 27
- I '$D(SRTPP) W !!,"A Transplant Assessment must be selected prior to using this option.",!!,"Press <RET> to continue " R X:DTIME G END
- S (SRSOUT,SRNXT)=0,$P(SRLINE,"-",80)="" D SRHDR^SRTPUTL
- START Q:SRSOUT!(SRNXT) D DISP
- W !,"Select Transplant Information to Edit: " R X:DTIME I '$T!(X["^") S SRSOUT=1 G END
- I X="" D ^SRTPLUN2 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 '1' to update VACO ID.)"
- 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
- I $P(SRAO(SREMIL),"^",2)=1!($P(SRAO(SREMIL),"^",2)=3) D SRHDR^SRTPUTL
- Q
- DISP ; display fields
- K SRCT S SRPAGE="PAGE: 1 OF "_$S(SRNOVA:5,1:4),SRHPG="RECIPIENT INFORMATION" D HDR^SRTPUTL
- K SRAO,DR S:SRNOVA SRDR="3;1;11;4;5;10;12;40;41;24;25;32;129;19;43;22;128;94"
- S:'SRNOVA SRDR="3;11;10;12;40;41;24;25;32;43;22;128;94;129;19"
- 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
- I SRNOVA D HW^SRTPUTL D
- .W !,"1. VACO ID:",?37,$P(SRAO(1),"^"),?55,"15. Sarcoidosis:",?72,$P(SRAO(15),"^")
- .S Y=$P(SRAO(2),"^") X ^DD("DD") W !,"2. Date of Transplant:",?37,Y,?55,"16. Lung Cancer:",?72,$P(SRAO(16),"^")
- .W !,"3. Date Placed on Waiting List:",?37,$P(SRAO(3),"^"),?55,"17: Emphysema:",?72,$P(SRAO(17),"^")
- .S SRAO(4)=$$OUT(4,$P(^SRT(SRTPP,0),"^",4))_"^4"
- .W !,"4. Recipient Height:",?37,$P(SRAO(4),"^"),?55,"18. Rejection:",?72,$P(SRAO(18),"^")
- .S SRAO(5)=$$OUT(5,$P(^SRT(SRTPP,0),"^",5))_"^5"
- .W !,"5. Recipient Weight:",?37,$P(SRAO(5),"^")
- .W !,"6. Recipient ABO Blood Type:",?37,$P(SRAO(6),"^")
- .W !,"7. Recipient CMV:",?37,$P(SRAO(7),"^")
- .W !,"8. Pulmonary Fibrosis:",?37,$P(SRAO(8),"^")
- .W !,"9. Pulmonary Hypertension:",?37,$P(SRAO(9),"^")
- .W !,"10. Alpha 1 Anti-Trypsin Deficiency:",?37,$P(SRAO(10),"^")
- .W !,"11. Bronchiectasis:",?37,$P(SRAO(11),"^")
- .W !,"12. Interstitial Lung Disease:",?37,$P(SRAO(12),"^")
- .W !,"13. Other Diagnosis: ",$P(SRAO(13),"^")
- .W !!,"14. Transplant Comments: " S SREXT=$P(SRAO(14),"^") D COMM^SRTPLIV1
- I 'SRNOVA D
- .W !,"1. VACO ID:",?37,$P(SRAO(1),"^")
- .W !,"2. Date Placed on Waiting List:",?37,$P(SRAO(2),"^")
- .W !,"3. Recipient ABO Blood Type:",?37,$P(SRAO(3),"^")
- .W !,"4. Recipient CMV:",?37,$P(SRAO(4),"^")
- .W !,"5. Pulmonary Fibrosis:",?37,$P(SRAO(5),"^")
- .W !,"6. Pulmonary Hypertension:",?37,$P(SRAO(6),"^")
- .W !,"7. Alpha 1 Anti-Trypsin Deficiency:",?37,$P(SRAO(7),"^")
- .W !,"8. Bronchiectasis:",?37,$P(SRAO(8),"^")
- .W !,"9. Interstitial Lung Disease:",?37,$P(SRAO(9),"^")
- .W !,"10. Sarcoidosis:",?37,$P(SRAO(10),"^")
- .W !,"11. Lung Cancer:",?37,$P(SRAO(11),"^")
- .W !,"12. Emphysema:",?37,$P(SRAO(12),"^")
- .W !,"13. Rejection:",?37,$P(SRAO(13),"^")
- .W !,"14. Other Diagnosis: ",$P(SRAO(14),"^")
- .W !!,"15. Transplant Comments: " S SREXT=$P(SRAO(15),"^") D COMM^SRTPLIV1
- W !,SRLINE
- Q
- OUT(SRFLD,SRY) ; get data in output form
- N C,Y,Z
- S Y=SRY,C=$P(^DD(139.5,SRFLD,0),"^",2) D:Y'="" Y^DIQ
- I Y="NO STUDY" S Y="NS"
- I SRFLD=4!(SRFLD=5) S Y=$E(Y,1,15)
- Q Y
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HSRTPLUN1 4211 printed Feb 19, 2025@00:15:03 Page 2
- SRTPLUN1 ;BIR/SJA - LUNG-RECIPIENT INFORMATION ;03/04/08
- +1 ;;3.0; Surgery ;**167**;24 Jun 93;Build 27
- +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
- +3 SET (SRSOUT,SRNXT)=0
- SET $PIECE(SRLINE,"-",80)=""
- DO SRHDR^SRTPUTL
- START if SRSOUT!(SRNXT)
- 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 ^SRTPLUN2
- 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 '1' to update VACO ID.)"
- +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
- QUIT
- +2 IF $PIECE(SRAO(SREMIL),"^",2)=1!($PIECE(SRAO(SREMIL),"^",2)=3)
- DO SRHDR^SRTPUTL
- +3 QUIT
- DISP ; display fields
- +1 KILL SRCT
- SET SRPAGE="PAGE: 1 OF "_$SELECT(SRNOVA:5,1:4)
- SET SRHPG="RECIPIENT INFORMATION"
- DO HDR^SRTPUTL
- +2 KILL SRAO,DR
- if SRNOVA
- SET SRDR="3;1;11;4;5;10;12;40;41;24;25;32;129;19;43;22;128;94"
- +3 if 'SRNOVA
- SET SRDR="3;11;10;12;40;41;24;25;32;43;22;128;94;129;19"
- +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 IF SRNOVA
- DO HW^SRTPUTL
- Begin DoDot:1
- +7 WRITE !,"1. VACO ID:",?37,$PIECE(SRAO(1),"^"),?55,"15. Sarcoidosis:",?72,$PIECE(SRAO(15),"^")
- +8 SET Y=$PIECE(SRAO(2),"^")
- XECUTE ^DD("DD")
- WRITE !,"2. Date of Transplant:",?37,Y,?55,"16. Lung Cancer:",?72,$PIECE(SRAO(16),"^")
- +9 WRITE !,"3. Date Placed on Waiting List:",?37,$PIECE(SRAO(3),"^"),?55,"17: Emphysema:",?72,$PIECE(SRAO(17),"^")
- +10 SET SRAO(4)=$$OUT(4,$PIECE(^SRT(SRTPP,0),"^",4))_"^4"
- +11 WRITE !,"4. Recipient Height:",?37,$PIECE(SRAO(4),"^"),?55,"18. Rejection:",?72,$PIECE(SRAO(18),"^")
- +12 SET SRAO(5)=$$OUT(5,$PIECE(^SRT(SRTPP,0),"^",5))_"^5"
- +13 WRITE !,"5. Recipient Weight:",?37,$PIECE(SRAO(5),"^")
- +14 WRITE !,"6. Recipient ABO Blood Type:",?37,$PIECE(SRAO(6),"^")
- +15 WRITE !,"7. Recipient CMV:",?37,$PIECE(SRAO(7),"^")
- +16 WRITE !,"8. Pulmonary Fibrosis:",?37,$PIECE(SRAO(8),"^")
- +17 WRITE !,"9. Pulmonary Hypertension:",?37,$PIECE(SRAO(9),"^")
- +18 WRITE !,"10. Alpha 1 Anti-Trypsin Deficiency:",?37,$PIECE(SRAO(10),"^")
- +19 WRITE !,"11. Bronchiectasis:",?37,$PIECE(SRAO(11),"^")
- +20 WRITE !,"12. Interstitial Lung Disease:",?37,$PIECE(SRAO(12),"^")
- +21 WRITE !,"13. Other Diagnosis: ",$PIECE(SRAO(13),"^")
- +22 WRITE !!,"14. Transplant Comments: "
- SET SREXT=$PIECE(SRAO(14),"^")
- DO COMM^SRTPLIV1
- End DoDot:1
- +23 IF 'SRNOVA
- Begin DoDot:1
- +24 WRITE !,"1. VACO ID:",?37,$PIECE(SRAO(1),"^")
- +25 WRITE !,"2. Date Placed on Waiting List:",?37,$PIECE(SRAO(2),"^")
- +26 WRITE !,"3. Recipient ABO Blood Type:",?37,$PIECE(SRAO(3),"^")
- +27 WRITE !,"4. Recipient CMV:",?37,$PIECE(SRAO(4),"^")
- +28 WRITE !,"5. Pulmonary Fibrosis:",?37,$PIECE(SRAO(5),"^")
- +29 WRITE !,"6. Pulmonary Hypertension:",?37,$PIECE(SRAO(6),"^")
- +30 WRITE !,"7. Alpha 1 Anti-Trypsin Deficiency:",?37,$PIECE(SRAO(7),"^")
- +31 WRITE !,"8. Bronchiectasis:",?37,$PIECE(SRAO(8),"^")
- +32 WRITE !,"9. Interstitial Lung Disease:",?37,$PIECE(SRAO(9),"^")
- +33 WRITE !,"10. Sarcoidosis:",?37,$PIECE(SRAO(10),"^")
- +34 WRITE !,"11. Lung Cancer:",?37,$PIECE(SRAO(11),"^")
- +35 WRITE !,"12. Emphysema:",?37,$PIECE(SRAO(12),"^")
- +36 WRITE !,"13. Rejection:",?37,$PIECE(SRAO(13),"^")
- +37 WRITE !,"14. Other Diagnosis: ",$PIECE(SRAO(14),"^")
- +38 WRITE !!,"15. Transplant Comments: "
- SET SREXT=$PIECE(SRAO(15),"^")
- DO COMM^SRTPLIV1
- End DoDot:1
- +39 WRITE !,SRLINE
- +40 QUIT
- OUT(SRFLD,SRY) ; get data in output form
- +1 NEW C,Y,Z
- +2 SET Y=SRY
- SET C=$PIECE(^DD(139.5,SRFLD,0),"^",2)
- if Y'=""
- DO Y^DIQ
- +3 IF Y="NO STUDY"
- SET Y="NS"
- +4 IF SRFLD=4!(SRFLD=5)
- SET Y=$EXTRACT(Y,1,15)
- +5 QUIT Y