>SET CENTURY ON
>SET DATE TO YMD
>
>if m.goApp.lTrace
> local lcTrace
> lcTrace = "Enter" + chr(13) + m.lcText
>endif
>
>lcText = m.lcText + "^" + STRTRAN(ALLTRIM(TTOC(rx.filled_date + rx.days_supply)),"/","-") + "^|"
>
>if m.goApp.lTrace
> ** add more INfo / steps to lcTrace Variable as you need before the check at end
> lcTrace = m.lcTrace ;
> + Chr(13) + "date+supply" + TTOC(rx.filled_date + rx.days_supply);
> + Chr(13) + m.lcText
>endif
>
>SET DATE TO AMERICAN
>SET CENTURY OFF
>* Price Override (Not supported) (position 39)
>lcText = m.lcText + "^^|"
>* Diagnoses (Code and Qualifier) (position 40 - 41)
>IF USED("diagnoses") and THIS.m_seek(ALLTRIM(STR(rx.rx_no)) + ALLTRIM(STR(refill_no)),"diagnoses","fullrx",1)
> lcText = m.lcText + "^" + ALLTRIM(diagnoses.diagnosis_code) + "^|";
> + "^" + ALLTRIM(diagnoses.diagnosis_code_qualifier) + "^|"
> if m.goApp.lTrace
> lcTrace = m.lcTrace ;
> + Chr(13) + "Diagnosiscodes open and found" + more info according to your tables;
> + Chr(13) + m.lcText
> endif
>ELSE
> lcText = m.lcText + "^^|" + "^^|"
>ENDIF
>
>* Facts and Comparisions Disease Code (Not supported) (position 42)
>lcText = m.lcText + "^^|"
>
>* Date Written (position 43)
>* 04/06/07 STB per Matt Bergmann - Changed format to include dashes and time
>SET CENTURY ON
>SET DATE TO YMD
>lcText = m.lcText + "^" + STRTRAN(ALLTRIM(TTOC(rx.written_date)),"/","-") + "^|"
>
>SET DATE TO AMERICAN
>SET CENTURY OFF
>
>if m.goApp.lTrace and occurs( "^^|", m.lcText)>4
> If (Working on a base table with added Trace Memo Field)
> replace cTraceMemo with m.lcTrace in WorkTable
> else
> = StrTofile(m.lcTrace, "yourlog.txt",.t.)
> endif
> assert .f. "Wrong number of Space-Placeholders!" && or a direct set step on if vfp.startmode or your typical check allows it
> endif
>Tommy Tillman A+ NetWork+ MCP