- PSNFDAMG ;BIR/DMA - On-Demand FDA Med Guide Display ; 7/19/21 9:24am
- ;;4.0;NATIONAL DRUG FILE;**108,263,264,437,572**; 30 Oct 98;Build 3
- ;Reference to ^PS(59.7 supported by DBIA #2613
- ;
- ;Removed On-Demand functionality, preserved URL reference *572
- ;
- EN(VAPRDIEN) ; Entry point for FDA Med Guide On-Demand Printing
- N FDAMGFN,FDAMGURL,PCURL,STATUS,X,PSNIP
- S FDAMGFN=$$FDAMG^PSNAPIS(VAPRDIEN)
- I FDAMGFN="" D Q
- . W !!,"There is no FDA Medication Guide associated with this medication.",!
- . D PAUSE
- ;
- W !!,"The following URL provides the link to the FDA Medication Guide associated"
- W !,"with this medication. Copy/paste the URL below into a browser to access"
- W !,"the FDA Medication Guide for this drug:"
- W !!
- ;
- ; Concatenating the Web Server URL to the FDA Med Guide file name
- S FDAMGURL=$$GET1^DIQ(59.7,1,100)_FDAMGFN
- ;
- D PRTURL(FDAMGURL)
- ;
- ;S PSNIP=$S($G(IO("IP"))'="":IO("IP"),1:"127.0.0.1")
- ;I $$VERSION^XLFIPV S PSNIP="["_$$CONVERT^XLFIPV(PSNIP)_"]"
- ;S PCURL="http://"_PSNIP_":8091/viewmg="
- ;
- ;W !!,"Please wait...",!
- ;
- ;Invoking Kernel HTTP Toolkit
- ;S STATUS=$$GETURL^XTHC10(PCURL_FDAMGURL)
- ;
- ;I +STATUS'=200 D
- ;. W !,"The system is unable to display FDA Med Guide automatically."
- ;. W !
- ;. W !,"The FDA Medication Guide will not automatically open on Thin Client and some"
- ;. W !,"types of encrypted sessions. If you do not believe this is the reason contact"
- ;. W !,"your local technical support for assistance."
- ;. W !
- ;. W !,"You can copy/paste the link above into your browser's address bar to retrieve"
- ;. W !,"the FDA Medication Guide."
- ;. W !
- ;
- D PAUSE
- Q
- ;
- PAUSE ;
- N DIR
- S DIR("A")="Enter RETURN to continue or '^' to exit",DIR(0)="E"
- W !
- D ^DIR
- ;S DIR("?")="^D HELP^PSNFDAMG("""_$G(FDAMGURL)_""")" D ^DIR
- Q
- ;
- ;HELP(MGURL) ; Help Text
- ;N DIR,DIRUT,DIROUT
- ;W !,"When unable to get the FDA Medication Guide to display, review the following"
- ;W !,"suggestion(s) for troubleshooting potential problems:"
- ;W !
- ;I $G(MGURL)'="" D
- ;. W !,"1) The browser did not open automatically. This may be due to the following:"
- ;. W !," - You might be connected to VistA via Thin Client or an encrypted session"
- ;. W !," that prevents the FDA Med Guide from automatically displaying. Please"
- ;. W !," copy and paste the URL link below into your browser's address bar to"
- ;. W !," retrieve the FDA Medication Guide:"
- ;. W !! D PRTURL(MGURL) W !
- ;. W !," - The computer might not have the required Java software component"
- ;. W !," installed or the software might not be functioning properly. Please,"
- ;. W !," contact technical support for assistance."
- ;. W !
- ;. S DIR("A")="Enter RETURN to continue" D PAUSE^VALM1 Q:($G(DIRUT)!$G(DIROUT))
- ;. ;
- ;. W !,"2) When doing a copy/paste of the link into the browser's address and an HTTP"
- ;. W !," 404 - File Not Found error is received. This may be due to the following:"
- ;. W !," - A common issue exists when the link is displayed in two lines in the"
- ;. W !," terminal screen. When you copy both lines at the same time and paste it"
- ;. W !," into the browser's address, the second line is ignored by the browser"
- ;. W !," resulting in a 'broken' link. To resolve this issue, copy and paste one"
- ;. W !," line at a time from the terminal screen into the browser's address to"
- ;. W !," make sure the complete link is used."
- ;. W !," - The FDA Medication Guide Server may be down at the moment. Please, wait"
- ;. W !," a few minutes and try again. If the problem persists, contact technical"
- ;. W !," support for assistance."
- ;. ;
- ;. W !!,"3) The browser opened automatically, however you receive an HTTP 404 - File"
- ;. W !," Not Found error. This may be due to the following:"
- ;. W !," - The FDA Medication Guide Server may be down at the moment. Please, wait"
- ;. W !," a few minutes and try again. If the problem persists, contact technical"
- ;. W !," support for assistance."
- ;. W !
- ;E D
- ;. W !,"1) If no FDA Medication Guide exists for a product that you believe should"
- ;. W !," have one, confirm that one is required by visiting the FDA website"
- ;. W !," (www.fda.gov). If one is required, log a support ticket to request its"
- ;. W !," addition. Please understand that there may be a delay between the time"
- ;. W !," that a new Medication Guide is posted to the FDA website and when it is"
- ;. W !," made available in VistA through a National Drug File data update patch."
- ; Q
- ;
- PRTURL(FDAMGURL) ; Prints the FDA Med Guide URL
- S X=$G(FDAMGURL) I $$LOW^XLFSTR($E(X,1,7))="http://" S X=$E(X,8,999)
- W $E(X,1,80) I $L(X)>80 D
- . F Q:$E(X,81,999)="" S X=$E(X,81,999) W !,$E(X,1,80)
- Q
- --- Routine Detail --- with STRUCTURED ROUTINE LISTING ---[H[J[2J[HPSNFDAMG 4807 printed Jan 18, 2025@03:25:03 Page 2
- PSNFDAMG ;BIR/DMA - On-Demand FDA Med Guide Display ; 7/19/21 9:24am
- +1 ;;4.0;NATIONAL DRUG FILE;**108,263,264,437,572**; 30 Oct 98;Build 3
- +2 ;Reference to ^PS(59.7 supported by DBIA #2613
- +3 ;
- +4 ;Removed On-Demand functionality, preserved URL reference *572
- +5 ;
- EN(VAPRDIEN) ; Entry point for FDA Med Guide On-Demand Printing
- +1 NEW FDAMGFN,FDAMGURL,PCURL,STATUS,X,PSNIP
- +2 SET FDAMGFN=$$FDAMG^PSNAPIS(VAPRDIEN)
- +3 IF FDAMGFN=""
- Begin DoDot:1
- +4 WRITE !!,"There is no FDA Medication Guide associated with this medication.",!
- +5 DO PAUSE
- End DoDot:1
- QUIT
- +6 ;
- +7 WRITE !!,"The following URL provides the link to the FDA Medication Guide associated"
- +8 WRITE !,"with this medication. Copy/paste the URL below into a browser to access"
- +9 WRITE !,"the FDA Medication Guide for this drug:"
- +10 WRITE !!
- +11 ;
- +12 ; Concatenating the Web Server URL to the FDA Med Guide file name
- +13 SET FDAMGURL=$$GET1^DIQ(59.7,1,100)_FDAMGFN
- +14 ;
- +15 DO PRTURL(FDAMGURL)
- +16 ;
- +17 ;S PSNIP=$S($G(IO("IP"))'="":IO("IP"),1:"127.0.0.1")
- +18 ;I $$VERSION^XLFIPV S PSNIP="["_$$CONVERT^XLFIPV(PSNIP)_"]"
- +19 ;S PCURL="http://"_PSNIP_":8091/viewmg="
- +20 ;
- +21 ;W !!,"Please wait...",!
- +22 ;
- +23 ;Invoking Kernel HTTP Toolkit
- +24 ;S STATUS=$$GETURL^XTHC10(PCURL_FDAMGURL)
- +25 ;
- +26 ;I +STATUS'=200 D
- +27 ;. W !,"The system is unable to display FDA Med Guide automatically."
- +28 ;. W !
- +29 ;. W !,"The FDA Medication Guide will not automatically open on Thin Client and some"
- +30 ;. W !,"types of encrypted sessions. If you do not believe this is the reason contact"
- +31 ;. W !,"your local technical support for assistance."
- +32 ;. W !
- +33 ;. W !,"You can copy/paste the link above into your browser's address bar to retrieve"
- +34 ;. W !,"the FDA Medication Guide."
- +35 ;. W !
- +36 ;
- +37 DO PAUSE
- +38 QUIT
- +39 ;
- PAUSE ;
- +1 NEW DIR
- +2 SET DIR("A")="Enter RETURN to continue or '^' to exit"
- SET DIR(0)="E"
- +3 WRITE !
- +4 DO ^DIR
- +5 ;S DIR("?")="^D HELP^PSNFDAMG("""_$G(FDAMGURL)_""")" D ^DIR
- +6 QUIT
- +7 ;
- +8 ;HELP(MGURL) ; Help Text
- +9 ;N DIR,DIRUT,DIROUT
- +10 ;W !,"When unable to get the FDA Medication Guide to display, review the following"
- +11 ;W !,"suggestion(s) for troubleshooting potential problems:"
- +12 ;W !
- +13 ;I $G(MGURL)'="" D
- +14 ;. W !,"1) The browser did not open automatically. This may be due to the following:"
- +15 ;. W !," - You might be connected to VistA via Thin Client or an encrypted session"
- +16 ;. W !," that prevents the FDA Med Guide from automatically displaying. Please"
- +17 ;. W !," copy and paste the URL link below into your browser's address bar to"
- +18 ;. W !," retrieve the FDA Medication Guide:"
- +19 ;. W !! D PRTURL(MGURL) W !
- +20 ;. W !," - The computer might not have the required Java software component"
- +21 ;. W !," installed or the software might not be functioning properly. Please,"
- +22 ;. W !," contact technical support for assistance."
- +23 ;. W !
- +24 ;. S DIR("A")="Enter RETURN to continue" D PAUSE^VALM1 Q:($G(DIRUT)!$G(DIROUT))
- +25 ;. ;
- +26 ;. W !,"2) When doing a copy/paste of the link into the browser's address and an HTTP"
- +27 ;. W !," 404 - File Not Found error is received. This may be due to the following:"
- +28 ;. W !," - A common issue exists when the link is displayed in two lines in the"
- +29 ;. W !," terminal screen. When you copy both lines at the same time and paste it"
- +30 ;. W !," into the browser's address, the second line is ignored by the browser"
- +31 ;. W !," resulting in a 'broken' link. To resolve this issue, copy and paste one"
- +32 ;. W !," line at a time from the terminal screen into the browser's address to"
- +33 ;. W !," make sure the complete link is used."
- +34 ;. W !," - The FDA Medication Guide Server may be down at the moment. Please, wait"
- +35 ;. W !," a few minutes and try again. If the problem persists, contact technical"
- +36 ;. W !," support for assistance."
- +37 ;. ;
- +38 ;. W !!,"3) The browser opened automatically, however you receive an HTTP 404 - File"
- +39 ;. W !," Not Found error. This may be due to the following:"
- +40 ;. W !," - The FDA Medication Guide Server may be down at the moment. Please, wait"
- +41 ;. W !," a few minutes and try again. If the problem persists, contact technical"
- +42 ;. W !," support for assistance."
- +43 ;. W !
- +44 ;E D
- +45 ;. W !,"1) If no FDA Medication Guide exists for a product that you believe should"
- +46 ;. W !," have one, confirm that one is required by visiting the FDA website"
- +47 ;. W !," (www.fda.gov). If one is required, log a support ticket to request its"
- +48 ;. W !," addition. Please understand that there may be a delay between the time"
- +49 ;. W !," that a new Medication Guide is posted to the FDA website and when it is"
- +50 ;. W !," made available in VistA through a National Drug File data update patch."
- +51 ; Q
- +52 ;
- PRTURL(FDAMGURL) ; Prints the FDA Med Guide URL
- +1 SET X=$GET(FDAMGURL)
- IF $$LOW^XLFSTR($EXTRACT(X,1,7))="http://"
- SET X=$EXTRACT(X,8,999)
- +2 WRITE $EXTRACT(X,1,80)
- IF $LENGTH(X)>80
- Begin DoDot:1
- +3 FOR
- if $EXTRACT(X,81,999)=""
- QUIT
- SET X=$EXTRACT(X,81,999)
- WRITE !,$EXTRACT(X,1,80)
- End DoDot:1
- +4 QUIT