>LOCAL lcLanguage > >IF glDemo > MESSAGEBOX("Option not available for demo",64,"Demo") >*TMN 10/25/07 > RETURN >ENDIF > >*TMT 12/07/09 new code to print the monograph from the profile form >DO CASE > CASE USED('language') > IF LANGUAGE.item_code = 'S' > lcLanguage = 'S' > ELSE > lcLanguage = 'E' > ENDIF > CASE USED('patient_master') > IF patient_master.LANGUAGE = 'S' > lcLanguage = 'S' > ELSE > lcLanguage = 'E' > ENDIF > OTHERWISE > lcLanguage = 'E' >ENDCASE > >*TMT 12/08/09 First, get the Thisform.p_RefillsLeft value, since it doesn't have one at this point unless >*we go to the White Screen first (Activate on the White Screen - fill) >THISFORM.m_pillsrefillsleft >*Next, we run the m_ProcessRx to get set up to print the label and/or Monograph >THISFORM.udcMedispan.m_ProcessRx(rx.rx_no,rx.refill_no,rx.patient_id,rx.doctor_id,rx.drug_id,rx.days_supply,rx.usage,rx.quantity_filled,rx.quantity_rx,rx.filled_date,.F.) > >*TMT 12/08/09 The medispan_io.pe_repwr will have the full Free-flowing Monograph in it if it exists for this >*rx and drug at this time.... If not, then we can't print it. >*In m_processRx above, the medispan_io record for this rx is converted over to many records in the >*medispan_out table to be printed in the reports below... >DO CASE > CASE EMPTY(medispan_io.pe_repwr) > MESSAGEBOX("There is no monograph for this drug.",48,"No Monograph") > OTHERWISE > SET PRINTER TO DEFAULT >*TMT Set focus to DONE button so we don't see the RX table from the GRID > THISFORM.cmdDone.SETFOCUS() > SELECT medispan_out > DO CASE > CASE lcLanguage = 'E' > REPORT FORM MonoBoldProfile NOCONSOLE ALL TO PRINTER PROMPT > CASE lcLanguage = 'S' > REPORT FORM MonoBoldSpanishProfile NOCONSOLE ALL TO PRINTER PROMPT > OTHERWISE > REPORT FORM MonoBoldProfile NOCONSOLE ALL TO PRINTER PROMPT > ENDCASE >ENDCASE > >*TMT Reset focus back to GRID >THISFORM.grdProfile.SETFOCUS() >SELECT rx >RETURN > >>