- PSS52P6 ;BIR/LDT - API FOR INFORMATION FROM FILE 52.6; 5 Sep 03
- ;;1.0;PHARMACY DATA MANAGEMENT;**85**;9/30/97
- ;
- ZERO(PSSIEN,PSSFT,PSSFL,LIST) ;
- ;PSSIEN - IEN of entry in IV ADDITIVES file (#52.6).
- ;PSSFT - Free Text name in IV ADDITIVES file (#52.6).
- ;PSSFL - Inactive flag - "" - All entries.
- ; FileMan Date - Only entries with no Inactive Date or an Inactive Date greater than this date.
- ;LIST - Subscript of ^TMP array in the form ^TMP($J,LIST,Field Number where Field Number is the
- ; Field Number of the data piece being returned.
- ;Returns PRINT NAME field (#.01), GENERIC DRUG field (#1), DRUG UNIT field (#2),
- ;NUMBER OF DAYS FOR IV ORDER field (#3), USUAL IV SCHEDULE field (#4), ADMINISTRATION TIMES field (#5),
- ;AVERAGE DRUG COST PER UNIT field (#7), INACTIVATION DATE field (#12), CONCENTRATION field (#13),
- ;MESSAGES field (#14), PHARMACY ORDERABLE ITEM field (#15), and USED IN IV FLUID ORDER ENTRY FIELD (#17)
- ;of IV ADDITIVES file (#52.6).
- N DIERR,ZZERR,PSS52P6,SCR,PSS
- I $G(LIST)']"" Q
- K ^TMP($J,LIST)
- I +$G(PSSIEN)'>0,($G(PSSFT)']"") S ^TMP($J,LIST,0)=-1_"^"_"NO DATA FOUND" Q
- I $G(PSSIEN)]"",+$G(PSSIEN)'>0 S ^TMP($J,LIST,0)=-1_"^"_"NO DATA FOUND" Q
- S SCR("S")=""
- I +$G(PSSFL)>0 N ND D SETSCRN^PSS52P6A
- I +$G(PSSIEN)>0 N PSSIEN2 S PSSIEN2=$$FIND1^DIC(52.6,"","A","`"_PSSIEN,,SCR("S"),"") D
- .I +PSSIEN2'>0 S ^TMP($J,LIST,0)=-1_"^"_"NO DATA FOUND" Q
- .S ^TMP($J,LIST,0)=1
- .D GETS^DIQ(52.6,+PSSIEN2,".01;1;2;3;4;5;7;12;13;14;15;17","IE","PSS52P6") S PSS(1)=0
- .F S PSS(1)=$O(PSS52P6(52.6,PSS(1))) Q:'PSS(1) D SETZRO^PSS52P6A
- I +$G(PSSIEN)'>0,$G(PSSFT)]"" D
- .I PSSFT["??" D LOOP^PSS52P6A(1) Q
- .D FIND^DIC(52.6,,"@;.01;2","QP",PSSFT,,"B",SCR("S"),,"")
- .I +$G(^TMP("DILIST",$J,0))=0 S ^TMP($J,LIST,0)=-1_"^"_"NO DATA FOUND" Q
- .I +^TMP("DILIST",$J,0)>0 S ^TMP($J,LIST,0)=+^TMP("DILIST",$J,0) N PSSXX S PSSXX=0 F S PSSXX=$O(^TMP("DILIST",$J,PSSXX)) Q:'PSSXX D
- ..S PSSIEN=+^TMP("DILIST",$J,PSSXX,0) K PSS52P6 D GETS^DIQ(52.6,+PSSIEN,".01;1;2;3;4;5;7;12;13;14;15;17","IE","PSS52P6") S PSS(1)=0
- ..F S PSS(1)=$O(PSS52P6(52.6,PSS(1))) Q:'PSS(1) D SETZRO^PSS52P6A
- K ^TMP("DILIST",$J)
- Q
- ;
- QCODE(PSSIEN,PSSFT,PSSFL,LIST) ;
- ;PSSIEN - IEN of entry in IV ADDITIVES file (#52.6).
- ;PSSFT - Free Text name in IV ADDITIVES file (#52.6).
- ;PSSFL - Inactive flag - 0 or "" - All entries.
- ; FileMan Date - Only entries with no Inactive Date or an Inactive Date greater than this date.
- ;LIST - Subscript of ^TMP array in the form ^TMP($J,LIST,Field Number where Field Number is the
- ; Field Number of the data piece being returned.
- ;Returns PRINT NAME field (#.01), QUICK CODE subfile (#52.61), QUICK CODE field (#.01), STRENGTH field (#1),
- ;USUAL INFUSION RATE field (#2), OTHER PRINT INFO field (#3), USUAL IV SCHEDULE field (#4), ADMINISTRATION TIMES
- ;field (#5), USUAL IV SOLUTION field (#6), and MED ROUTE field (#7) of IV ADDITIVES file (#52.6).
- N DIERR,ZZERR,SCR,PSS
- I $G(LIST)']"" Q
- K ^TMP($J,LIST),^TMP("PSS52P6",$J)
- I +$G(PSSIEN)'>0,($G(PSSFT)']"") S ^TMP($J,LIST,0)=-1_"^"_"NO DATA FOUND" Q
- I $G(PSSIEN)]"",+$G(PSSIEN)'>0 S ^TMP($J,LIST,0)=-1_"^"_"NO DATA FOUND" Q
- D QCODE^PSS52P6A
- Q
- ;
- ELYTES(PSSIEN,PSSFT,PSSFL,LIST) ;
- ;PSSIEN - IEN of entry in IV ADDITIVES file (#52.6).
- ;PSSFT - Free Text name in IV ADDITIVES file (#52.6).
- ;PSSFL - Inactive flag - 0 or "" - All entries.
- ; FileMan Date - Only entries with no Inactive Date or an Inactive Date greater than this date.
- ;LIST - Subscript of ^TMP array in the form ^TMP($J,LIST,Field Number where Field Number is the
- ; Field Number of the data piece being returned.
- ;Returns PRINT NAME field (#.01), ELECTROLYTES subfile (#52.62), ELECTROLYTE field (#.01),
- ;and CONCENTRATION field (#1) of IV ADDITIVES file (#52.6).
- N DIERR,ZZERR,SCR,PSS
- I $G(LIST)']"" Q
- K ^TMP($J,LIST),^TMP("PSS52P6",$J)
- I +$G(PSSIEN)'>0,($G(PSSFT)']"") S ^TMP($J,LIST,0)=-1_"^"_"NO DATA FOUND" Q
- I $G(PSSIEN)]"",+$G(PSSIEN)'>0 S ^TMP($J,LIST,0)=-1_"^"_"NO DATA FOUND" Q
- D ELYTES^PSS52P6B
- Q
- ;
- SYNONYM(PSSIEN,PSSFT,PSSFL,LIST) ;
- ;PSSIEN - IEN of entry in IV ADDITIVES file (#52.6).
- ;PSSFT - Free Text name in IV ADDITIVES file (#52.6).
- ;PSSFL - Inactive flag - 0 or "" - All entries.
- ; FileMan Date - Only entries with no Inactive Date or an Inactive Date greater than this date.
- ;LIST - Subscript of ^TMP array in the form ^TMP($J,LIST,Field Number where Field Number is the
- ; Field Number of the data piece being returned.
- ;Returns PRINT NAME field (#.01), SYNONYM subfile (#52.63), SYNONYM field (#.01) of IV ADDITIVES file (#52.6).
- N DIERR,ZZERR,SCR,PSS
- I $G(LIST)']"" Q
- K ^TMP($J,LIST),^TMP("PSS52P6",$J)
- I +$G(PSSIEN)'>0,($G(PSSFT)']"") S ^TMP($J,LIST,0)=-1_"^"_"NO DATA FOUND" Q
- I $G(PSSIEN)]"",+$G(PSSIEN)'>0 S ^TMP($J,LIST,0)=-1_"^"_"NO DATA FOUND" Q
- D SYNONYM^PSS52P6B
- Q
- ;
- INACTDT(PSSIEN) ;
- ;PSSIEN - IEN of entry in IV ADDITIVES file (#52.6).
- ;Returns INACTIVATION DATE field (#12) of IV ADDITIVES file (#52.6).
- N DIERR,ZZERR,PSS52P6,PSS
- I +$G(PSSIEN)'>0 Q -1_"^"_"NO DATA FOUND"
- I +$G(PSSIEN)>0 D GETS^DIQ(52.6,+PSSIEN,"12","I","PSS52P6") S PSS(1)=0 D
- .I '$D(PSS52P6) S PSSINACT=-1_"^"_"NO DATA FOUND" Q
- .F S PSS(1)=$O(PSS52P6(52.6,PSS(1))) Q:'PSS(1) S PSSINACT=PSS52P6(52.6,PSS(1),12,"I")
- Q PSSINACT
- ;
- DRGINFO(PSSIEN,PSSFT,PSSFL,LIST) ;
- ;PSSIEN - IEN of entry in IV ADDITIVES file (#52.6).
- ;PSSFT - Free Text name in IV ADDITIVES file (#52.6).
- ;PSSFL - Inactive flag - 0 or "" - All entries.
- ; FileMan Date - Only entries with no Inactive Date or an Inactive Date greater than this date.
- ;LIST - Subscript of ^TMP array in the form ^TMP($J,LIST,Field Number where Field Number is the
- ; Field Number of the data piece being returned.
- ;Returns PRINT NAME field (#.01), DRUG INFORMATION subfile (#52.64), DRUG INFORMATION field (#.01)
- ;of IV ADDITIVES file (#52.6).
- N DIERR,ZZERR,PSS52P6,SCR,PSS
- I $G(LIST)']"" Q
- K ^TMP($J,LIST)
- I +$G(PSSIEN)'>0,($G(PSSFT)']"") S ^TMP($J,LIST,0)=-1_"^"_"NO DATA FOUND" Q
- I $G(PSSIEN)]"",+$G(PSSIEN)'>0 S ^TMP($J,LIST,0)=-1_"^"_"NO DATA FOUND" Q
- D DRGINFO^PSS52P6B
- Q
- ;
- DRGIEN(PSS50,PSSFL,LIST) ;
- ;PSS50 - IEN of entry in the DRUG file (#50) [required].
- ;PSSFL - Inactive flag - 0 or "" - All entries.
- ; FileMan Date - Only entries with no Inactive Date or an Inactive Date greater than this date.
- ;LIST - Subscript of ^TMP array in the form ^TMP($J,LIST,Field Number where Field Number is the
- ; Field Number of the data piece being returned.
- ;Returns PRINT NAME field (#.01) of IV ADDITIVES file (#52.6).
- N DIERR,ZZERR,PSS52P6,SCR,PSS
- I $G(LIST)']"" Q
- K ^TMP($J,LIST)
- I +$G(PSS50)'>0 S ^TMP($J,LIST,0)=-1_"^"_"NO DATA FOUND" Q
- D DRGIEN^PSS52P6B
- Q
- ;
- LOOKUP(PSS50P7,PSSFL,LIST) ;
- ;PSS50P7 - IEN of entry in PHARMACY ORDERABLE ITEM file (#50.7).
- ;PSSFL - Inactive flag - 0 or "" - All entries.
- ; FileMan Date - Only entries with no Inactive Date or an Inactive Date greater than this date.
- ;LIST - Subscript of ^TMP array in the form ^TMP($J,LIST,Field Number where Field Number is the
- ; Field Number of the data piece being returned.
- ;Returns PRINT NAME field (#.01), MESSAGES field (#14), QUICK CODE subfile (#52.61), QUICK CODE field (#.01),
- ;STRENGTH field (#1), USUAL INFUSION RATE field (#2), OTHER PRINT INFO field (#3), USUAL IV SCHEDULE field (#4),
- ;ADMINISTRATION TIMES field (#5), USUAL IV SOLUTION field (#6), MED ROUTE field (#7), SYNONYM subfile (#52.63),
- ;SYNONYM field (#.01) of IV ADDITIVES file (#52.6).
- N DIERR,ZZERR,PSS52P6,SCR
- I $G(LIST)']"" Q
- K ^TMP($J,LIST)
- I +$G(PSS50P7)'>0 S ^TMP($J,LIST,0)=-1_"^"_"NO DATA FOUND" Q
- D LOOKUP^PSS52P6B
- Q
- ;
- POI(PSSOI,PSSFL,LIST) ;
- ;PSSOI - IEN of entry in the PHARMACY ORDERABLE ITEM file (#50.7) [required].
- ;PSSFL - Inactive flag - 0 or "" - All entries.
- ; FileMan Date - Only entries with no Inactive Date or an Inactive Date greater than this date.
- ;LIST - Subscript of ^TMP array in the form ^TMP($J,LIST,Field Number where Field Number is the
- ; Field Number of the data piece being returned.
- ;Returns PRINT NAME field (#.01) of IV ADDITIVES file (#52.6).
- N DIERR,ZZERR,PSS52P6,SCR,PSS
- I $G(LIST)']"" Q
- K ^TMP($J,LIST)
- I +$G(PSSOI)'>0 S ^TMP($J,LIST,0)=-1_"^"_"NO DATA FOUND" Q
- D POI^PSS52P6B
- Q
- C(PSSQCODE,PSSIEN) ;
- ;PSSQCODE - Text name of QUICKCODE [required].
- ;PSSIEN - IEN of entry in the IV ADDITIVES file (#52.6) [required].
- ;Returns 1 if there's an entry in the C x-ref, otherwise a 0.
- I $G(PSSQCODE)']"" Q 0
- I +$G(PSSIEN)'>0 Q 0
- I $D(^PS(52.6,"C",PSSQCODE,PSSIEN)) Q 1
- Q 0
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSS52P6 8734 printed Feb 18, 2025@23:56:13 Page 2
- PSS52P6 ;BIR/LDT - API FOR INFORMATION FROM FILE 52.6; 5 Sep 03
- +1 ;;1.0;PHARMACY DATA MANAGEMENT;**85**;9/30/97
- +2 ;
- ZERO(PSSIEN,PSSFT,PSSFL,LIST) ;
- +1 ;PSSIEN - IEN of entry in IV ADDITIVES file (#52.6).
- +2 ;PSSFT - Free Text name in IV ADDITIVES file (#52.6).
- +3 ;PSSFL - Inactive flag - "" - All entries.
- +4 ; FileMan Date - Only entries with no Inactive Date or an Inactive Date greater than this date.
- +5 ;LIST - Subscript of ^TMP array in the form ^TMP($J,LIST,Field Number where Field Number is the
- +6 ; Field Number of the data piece being returned.
- +7 ;Returns PRINT NAME field (#.01), GENERIC DRUG field (#1), DRUG UNIT field (#2),
- +8 ;NUMBER OF DAYS FOR IV ORDER field (#3), USUAL IV SCHEDULE field (#4), ADMINISTRATION TIMES field (#5),
- +9 ;AVERAGE DRUG COST PER UNIT field (#7), INACTIVATION DATE field (#12), CONCENTRATION field (#13),
- +10 ;MESSAGES field (#14), PHARMACY ORDERABLE ITEM field (#15), and USED IN IV FLUID ORDER ENTRY FIELD (#17)
- +11 ;of IV ADDITIVES file (#52.6).
- +12 NEW DIERR,ZZERR,PSS52P6,SCR,PSS
- +13 IF $GET(LIST)']""
- QUIT
- +14 KILL ^TMP($JOB,LIST)
- +15 IF +$GET(PSSIEN)'>0
- IF ($GET(PSSFT)']"")
- SET ^TMP($JOB,LIST,0)=-1_"^"_"NO DATA FOUND"
- QUIT
- +16 IF $GET(PSSIEN)]""
- IF +$GET(PSSIEN)'>0
- SET ^TMP($JOB,LIST,0)=-1_"^"_"NO DATA FOUND"
- QUIT
- +17 SET SCR("S")=""
- +18 IF +$GET(PSSFL)>0
- NEW ND
- DO SETSCRN^PSS52P6A
- +19 IF +$GET(PSSIEN)>0
- NEW PSSIEN2
- SET PSSIEN2=$$FIND1^DIC(52.6,"","A","`"_PSSIEN,,SCR("S"),"")
- Begin DoDot:1
- +20 IF +PSSIEN2'>0
- SET ^TMP($JOB,LIST,0)=-1_"^"_"NO DATA FOUND"
- QUIT
- +21 SET ^TMP($JOB,LIST,0)=1
- +22 DO GETS^DIQ(52.6,+PSSIEN2,".01;1;2;3;4;5;7;12;13;14;15;17","IE","PSS52P6")
- SET PSS(1)=0
- +23 FOR
- SET PSS(1)=$ORDER(PSS52P6(52.6,PSS(1)))
- if 'PSS(1)
- QUIT
- DO SETZRO^PSS52P6A
- End DoDot:1
- +24 IF +$GET(PSSIEN)'>0
- IF $GET(PSSFT)]""
- Begin DoDot:1
- +25 IF PSSFT["??"
- DO LOOP^PSS52P6A(1)
- QUIT
- +26 DO FIND^DIC(52.6,,"@;.01;2","QP",PSSFT,,"B",SCR("S"),,"")
- +27 IF +$GET(^TMP("DILIST",$JOB,0))=0
- SET ^TMP($JOB,LIST,0)=-1_"^"_"NO DATA FOUND"
- QUIT
- +28 IF +^TMP("DILIST",$JOB,0)>0
- SET ^TMP($JOB,LIST,0)=+^TMP("DILIST",$JOB,0)
- NEW PSSXX
- SET PSSXX=0
- FOR
- SET PSSXX=$ORDER(^TMP("DILIST",$JOB,PSSXX))
- if 'PSSXX
- QUIT
- Begin DoDot:2
- +29 SET PSSIEN=+^TMP("DILIST",$JOB,PSSXX,0)
- KILL PSS52P6
- DO GETS^DIQ(52.6,+PSSIEN,".01;1;2;3;4;5;7;12;13;14;15;17","IE","PSS52P6")
- SET PSS(1)=0
- +30 FOR
- SET PSS(1)=$ORDER(PSS52P6(52.6,PSS(1)))
- if 'PSS(1)
- QUIT
- DO SETZRO^PSS52P6A
- End DoDot:2
- End DoDot:1
- +31 KILL ^TMP("DILIST",$JOB)
- +32 QUIT
- +33 ;
- QCODE(PSSIEN,PSSFT,PSSFL,LIST) ;
- +1 ;PSSIEN - IEN of entry in IV ADDITIVES file (#52.6).
- +2 ;PSSFT - Free Text name in IV ADDITIVES file (#52.6).
- +3 ;PSSFL - Inactive flag - 0 or "" - All entries.
- +4 ; FileMan Date - Only entries with no Inactive Date or an Inactive Date greater than this date.
- +5 ;LIST - Subscript of ^TMP array in the form ^TMP($J,LIST,Field Number where Field Number is the
- +6 ; Field Number of the data piece being returned.
- +7 ;Returns PRINT NAME field (#.01), QUICK CODE subfile (#52.61), QUICK CODE field (#.01), STRENGTH field (#1),
- +8 ;USUAL INFUSION RATE field (#2), OTHER PRINT INFO field (#3), USUAL IV SCHEDULE field (#4), ADMINISTRATION TIMES
- +9 ;field (#5), USUAL IV SOLUTION field (#6), and MED ROUTE field (#7) of IV ADDITIVES file (#52.6).
- +10 NEW DIERR,ZZERR,SCR,PSS
- +11 IF $GET(LIST)']""
- QUIT
- +12 KILL ^TMP($JOB,LIST),^TMP("PSS52P6",$JOB)
- +13 IF +$GET(PSSIEN)'>0
- IF ($GET(PSSFT)']"")
- SET ^TMP($JOB,LIST,0)=-1_"^"_"NO DATA FOUND"
- QUIT
- +14 IF $GET(PSSIEN)]""
- IF +$GET(PSSIEN)'>0
- SET ^TMP($JOB,LIST,0)=-1_"^"_"NO DATA FOUND"
- QUIT
- +15 DO QCODE^PSS52P6A
- +16 QUIT
- +17 ;
- ELYTES(PSSIEN,PSSFT,PSSFL,LIST) ;
- +1 ;PSSIEN - IEN of entry in IV ADDITIVES file (#52.6).
- +2 ;PSSFT - Free Text name in IV ADDITIVES file (#52.6).
- +3 ;PSSFL - Inactive flag - 0 or "" - All entries.
- +4 ; FileMan Date - Only entries with no Inactive Date or an Inactive Date greater than this date.
- +5 ;LIST - Subscript of ^TMP array in the form ^TMP($J,LIST,Field Number where Field Number is the
- +6 ; Field Number of the data piece being returned.
- +7 ;Returns PRINT NAME field (#.01), ELECTROLYTES subfile (#52.62), ELECTROLYTE field (#.01),
- +8 ;and CONCENTRATION field (#1) of IV ADDITIVES file (#52.6).
- +9 NEW DIERR,ZZERR,SCR,PSS
- +10 IF $GET(LIST)']""
- QUIT
- +11 KILL ^TMP($JOB,LIST),^TMP("PSS52P6",$JOB)
- +12 IF +$GET(PSSIEN)'>0
- IF ($GET(PSSFT)']"")
- SET ^TMP($JOB,LIST,0)=-1_"^"_"NO DATA FOUND"
- QUIT
- +13 IF $GET(PSSIEN)]""
- IF +$GET(PSSIEN)'>0
- SET ^TMP($JOB,LIST,0)=-1_"^"_"NO DATA FOUND"
- QUIT
- +14 DO ELYTES^PSS52P6B
- +15 QUIT
- +16 ;
- SYNONYM(PSSIEN,PSSFT,PSSFL,LIST) ;
- +1 ;PSSIEN - IEN of entry in IV ADDITIVES file (#52.6).
- +2 ;PSSFT - Free Text name in IV ADDITIVES file (#52.6).
- +3 ;PSSFL - Inactive flag - 0 or "" - All entries.
- +4 ; FileMan Date - Only entries with no Inactive Date or an Inactive Date greater than this date.
- +5 ;LIST - Subscript of ^TMP array in the form ^TMP($J,LIST,Field Number where Field Number is the
- +6 ; Field Number of the data piece being returned.
- +7 ;Returns PRINT NAME field (#.01), SYNONYM subfile (#52.63), SYNONYM field (#.01) of IV ADDITIVES file (#52.6).
- +8 NEW DIERR,ZZERR,SCR,PSS
- +9 IF $GET(LIST)']""
- QUIT
- +10 KILL ^TMP($JOB,LIST),^TMP("PSS52P6",$JOB)
- +11 IF +$GET(PSSIEN)'>0
- IF ($GET(PSSFT)']"")
- SET ^TMP($JOB,LIST,0)=-1_"^"_"NO DATA FOUND"
- QUIT
- +12 IF $GET(PSSIEN)]""
- IF +$GET(PSSIEN)'>0
- SET ^TMP($JOB,LIST,0)=-1_"^"_"NO DATA FOUND"
- QUIT
- +13 DO SYNONYM^PSS52P6B
- +14 QUIT
- +15 ;
- INACTDT(PSSIEN) ;
- +1 ;PSSIEN - IEN of entry in IV ADDITIVES file (#52.6).
- +2 ;Returns INACTIVATION DATE field (#12) of IV ADDITIVES file (#52.6).
- +3 NEW DIERR,ZZERR,PSS52P6,PSS
- +4 IF +$GET(PSSIEN)'>0
- QUIT -1_"^"_"NO DATA FOUND"
- +5 IF +$GET(PSSIEN)>0
- DO GETS^DIQ(52.6,+PSSIEN,"12","I","PSS52P6")
- SET PSS(1)=0
- Begin DoDot:1
- +6 IF '$DATA(PSS52P6)
- SET PSSINACT=-1_"^"_"NO DATA FOUND"
- QUIT
- +7 FOR
- SET PSS(1)=$ORDER(PSS52P6(52.6,PSS(1)))
- if 'PSS(1)
- QUIT
- SET PSSINACT=PSS52P6(52.6,PSS(1),12,"I")
- End DoDot:1
- +8 QUIT PSSINACT
- +9 ;
- DRGINFO(PSSIEN,PSSFT,PSSFL,LIST) ;
- +1 ;PSSIEN - IEN of entry in IV ADDITIVES file (#52.6).
- +2 ;PSSFT - Free Text name in IV ADDITIVES file (#52.6).
- +3 ;PSSFL - Inactive flag - 0 or "" - All entries.
- +4 ; FileMan Date - Only entries with no Inactive Date or an Inactive Date greater than this date.
- +5 ;LIST - Subscript of ^TMP array in the form ^TMP($J,LIST,Field Number where Field Number is the
- +6 ; Field Number of the data piece being returned.
- +7 ;Returns PRINT NAME field (#.01), DRUG INFORMATION subfile (#52.64), DRUG INFORMATION field (#.01)
- +8 ;of IV ADDITIVES file (#52.6).
- +9 NEW DIERR,ZZERR,PSS52P6,SCR,PSS
- +10 IF $GET(LIST)']""
- QUIT
- +11 KILL ^TMP($JOB,LIST)
- +12 IF +$GET(PSSIEN)'>0
- IF ($GET(PSSFT)']"")
- SET ^TMP($JOB,LIST,0)=-1_"^"_"NO DATA FOUND"
- QUIT
- +13 IF $GET(PSSIEN)]""
- IF +$GET(PSSIEN)'>0
- SET ^TMP($JOB,LIST,0)=-1_"^"_"NO DATA FOUND"
- QUIT
- +14 DO DRGINFO^PSS52P6B
- +15 QUIT
- +16 ;
- DRGIEN(PSS50,PSSFL,LIST) ;
- +1 ;PSS50 - IEN of entry in the DRUG file (#50) [required].
- +2 ;PSSFL - Inactive flag - 0 or "" - All entries.
- +3 ; FileMan Date - Only entries with no Inactive Date or an Inactive Date greater than this date.
- +4 ;LIST - Subscript of ^TMP array in the form ^TMP($J,LIST,Field Number where Field Number is the
- +5 ; Field Number of the data piece being returned.
- +6 ;Returns PRINT NAME field (#.01) of IV ADDITIVES file (#52.6).
- +7 NEW DIERR,ZZERR,PSS52P6,SCR,PSS
- +8 IF $GET(LIST)']""
- QUIT
- +9 KILL ^TMP($JOB,LIST)
- +10 IF +$GET(PSS50)'>0
- SET ^TMP($JOB,LIST,0)=-1_"^"_"NO DATA FOUND"
- QUIT
- +11 DO DRGIEN^PSS52P6B
- +12 QUIT
- +13 ;
- LOOKUP(PSS50P7,PSSFL,LIST) ;
- +1 ;PSS50P7 - IEN of entry in PHARMACY ORDERABLE ITEM file (#50.7).
- +2 ;PSSFL - Inactive flag - 0 or "" - All entries.
- +3 ; FileMan Date - Only entries with no Inactive Date or an Inactive Date greater than this date.
- +4 ;LIST - Subscript of ^TMP array in the form ^TMP($J,LIST,Field Number where Field Number is the
- +5 ; Field Number of the data piece being returned.
- +6 ;Returns PRINT NAME field (#.01), MESSAGES field (#14), QUICK CODE subfile (#52.61), QUICK CODE field (#.01),
- +7 ;STRENGTH field (#1), USUAL INFUSION RATE field (#2), OTHER PRINT INFO field (#3), USUAL IV SCHEDULE field (#4),
- +8 ;ADMINISTRATION TIMES field (#5), USUAL IV SOLUTION field (#6), MED ROUTE field (#7), SYNONYM subfile (#52.63),
- +9 ;SYNONYM field (#.01) of IV ADDITIVES file (#52.6).
- +10 NEW DIERR,ZZERR,PSS52P6,SCR
- +11 IF $GET(LIST)']""
- QUIT
- +12 KILL ^TMP($JOB,LIST)
- +13 IF +$GET(PSS50P7)'>0
- SET ^TMP($JOB,LIST,0)=-1_"^"_"NO DATA FOUND"
- QUIT
- +14 DO LOOKUP^PSS52P6B
- +15 QUIT
- +16 ;
- POI(PSSOI,PSSFL,LIST) ;
- +1 ;PSSOI - IEN of entry in the PHARMACY ORDERABLE ITEM file (#50.7) [required].
- +2 ;PSSFL - Inactive flag - 0 or "" - All entries.
- +3 ; FileMan Date - Only entries with no Inactive Date or an Inactive Date greater than this date.
- +4 ;LIST - Subscript of ^TMP array in the form ^TMP($J,LIST,Field Number where Field Number is the
- +5 ; Field Number of the data piece being returned.
- +6 ;Returns PRINT NAME field (#.01) of IV ADDITIVES file (#52.6).
- +7 NEW DIERR,ZZERR,PSS52P6,SCR,PSS
- +8 IF $GET(LIST)']""
- QUIT
- +9 KILL ^TMP($JOB,LIST)
- +10 IF +$GET(PSSOI)'>0
- SET ^TMP($JOB,LIST,0)=-1_"^"_"NO DATA FOUND"
- QUIT
- +11 DO POI^PSS52P6B
- +12 QUIT
- C(PSSQCODE,PSSIEN) ;
- +1 ;PSSQCODE - Text name of QUICKCODE [required].
- +2 ;PSSIEN - IEN of entry in the IV ADDITIVES file (#52.6) [required].
- +3 ;Returns 1 if there's an entry in the C x-ref, otherwise a 0.
- +4 IF $GET(PSSQCODE)']""
- QUIT 0
- +5 IF +$GET(PSSIEN)'>0
- QUIT 0
- +6 IF $DATA(^PS(52.6,"C",PSSQCODE,PSSIEN))
- QUIT 1
- +7 QUIT 0