Attribute VB_Name = "modPrintOut" Option Explicit Public Sub Draw_HIV() OpenMainReport App.Path & "\LabPrint_HIV.RPT", "LABORATORY", _ strHospAdd, strRequestNum, gblRequestInfo.strAddress, "1" ShowReportViewer False, "Laboratory Result Viewing", blnDirect End Sub Public Sub Draw_APTT() OpenMainReport App.Path & "\LabPrint_APTT.RPT", "LABORATORY", _ strHospAdd, strRequestNum ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_Crossmatching() OpenMainReport App.Path & "\LabPrint_Crossmatch.RPT", "LABORATORY", _ strHospAdd, strRequestNum ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_FlowCytometry() OpenMainReport App.Path & "\LabPrint_FlowCytometry.RPT", "LABORATORY", _ strHospName, strHospAdd, strEmployeeName, gblRequestInfo.strPathologist, strRequestNum ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_HLA_Screening() OpenMainReport App.Path & "\LabPrint_HLA_Screening.RPT", "LABORATORY", _ strHospName, strHospAdd, strEmployeeName, gblRequestInfo.strPathologist, strRequestNum ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_HLA_Specific() OpenMainReport App.Path & "\LabPrint_HLA_Specific.RPT", "LABORATORY", _ strHospName, strHospAdd, strEmployeeName, gblRequestInfo.strPathologist, strRequestNum ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_CYA() OpenMainReport App.Path & "\LabPrint_CYA.RPT", "LABORATORY", _ strHospName, strHospAdd, strEmployeeName, gblRequestInfo.strPathologist, strRequestNum ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_CS() OpenMainReport App.Path + "\LabPrint_CS.RPT", "LABORATORY", _ strRequestNum, strHospName, strHospAdd OpenSubReport "Antibiotic", "LABORATORY", strRequestNum ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_Histopath() OpenMainReport App.Path & "\LabPrint_Histopath.RPT", "LABORATORY", _ strHospName, strHospAdd, strEmployeeName, gblRequestInfo.strPathologist, strRequestNum, "X", "False" ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_PreFormattedExams() If gblRequestInfo.strFormType = "P" And gblRequestInfo.strLabSectionID = "FLW" Then OpenMainReport App.Path + "\LabPrint_Campath.RPT", "LABORATORY", strHospAdd, strRequestNum, CStr(gblResultInfo.intEntryMode) OpenSubReport "mm3", "LABORATORY", strRequestNum, CStr(gblResultInfo.intEntryMode) Else If gblRequestInfo.strFormType = "2" And gblRequestInfo.strLabSectionID = "CEL" Then OpenMainReport App.Path + "\LabPrint_Interpretation.RPT", "LABORATORY", _ strHospAdd, strRequestNum, CStr(gblResultInfo.intEntryMode) Else OpenMainReport App.Path + "\LabPrint_PreFormattedExams.RPT", "LABORATORY", _ strHospAdd, strRequestNum OpenSubReport "ShortForm.rpt", "LABORATORY", strRequestNum, CStr(gblResultInfo.intEntryMode) OpenSubReport "NormalValueFormat.rpt", "LABORATORY", strRequestNum, CStr(gblResultInfo.intEntryMode) OpenSubReport "ConversionFactor.rpt", "LABORATORY", strRequestNum, CStr(gblResultInfo.intEntryMode) OpenSubReport "SpecificColumn1.rpt", "LABORATORY", strRequestNum, CStr(gblResultInfo.intEntryMode) OpenSubReport "SpecificColumn2.rpt", "LABORATORY", strRequestNum, CStr(gblResultInfo.intEntryMode) OpenSubReport "NormalValueRangeFormat.rpt", "LABORATORY", strRequestNum, CStr(gblResultInfo.intEntryMode) End If End If ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_StoneAnalysis() OpenMainReport App.Path + "\LabPrint_StoneAnalysis.RPT", "LABORATORY", _ strHospAdd, strRequestNum ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_Urinalysis() OpenMainReport App.Path + "\LabPrint_Urinalysis.RPT", "LABORATORY", strHospAdd, strRequestNum ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_Widal() OpenMainReport App.Path + "\LabPrint_Widal.RPT", "LABORATORY", strHospAdd, strRequestNum ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_StoolExam() OpenMainReport App.Path & "\LabPrint_StoneAnalysis.RPT", "LABORATORY", _ strHospName, strHospAdd, strEmployeeName, gblRequestInfo.strPathologist, strRequestNum ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_Stool() OpenMainReport App.Path & "\LabPrint_StoolExam.RPT", "LABORATORY", _ strHospTitle, strHospAdd, strRequestNum ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_Stone() OpenMainReport App.Path & "\LabPrint_StoneAnalysis.RPT", "LABORATORY", _ strHospAdd, strRequestNum ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_Chemistry(Optional mSampleNum As String = "") If gblRequestInfo.strLabSectionID = "CCH" Then OpenMainReport App.Path & "\cch-qf-004.RPT", "LABORATORY", strCSNumber, mSampleNum, strHospName, strHospAdd ShowReportViewer False, "Result Preview", blnDirect ElseIf gblRequestInfo.strLabSectionID = "HEM" Then OpenMainReport App.Path & "\hem-qf-001.RPT", "LABORATORY", strCSNumber, mSampleNum, strHospName, strHospAdd ShowReportViewer False, "Result Preview", blnDirect End If End Sub Public Sub Draw_Papsmear() OpenMainReport App.Path + "\LabPrint_Papsmear.RPT", "LABORATORY", _ strHospTitle, strHospAdd, strEmployeeName, gblRequestInfo.strPathologist, strRequestNum ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_PreFormats() ' If gblRequestInfo.strFormType = "P" And gblRequestInfo.strLabSectionID = "FLW" Then ' OpenMainReport App.Path + "\LabPrint_Campath.RPT", "LABORATORY", _ ' strHospAdd, strRequestNum, "1" ' OpenSubReport "mm3", "LABORATORY", strRequestNum, "1" ' Else ' If gblRequestInfo.strFormType = "2" And gblRequestInfo.strLabSectionID = "CEL" Then ' OpenMainReport App.Path + "\LabPrint_Interpretation.RPT", "LABORATORY", _ ' strHospAdd, strRequestNum, "1" ' Else ' OpenMainReport App.Path + "\LabPrint_PreFormattedExams.RPT", "LABORATORY", _ ' strHospAdd, strRequestNum ' OpenSubReport "ShortForm.rpt", "LABORATORY", strRequestNum, "1" ' OpenSubReport "NormalValueFormat.rpt", "LABORATORY", strRequestNum, "1" ' OpenSubReport "ConversionFactor.rpt", "LABORATORY", strRequestNum, "1" ' OpenSubReport "SpecificColumn1.rpt", "LABORATORY", strRequestNum, "1" ' OpenSubReport "SpecificColumn2.rpt", "LABORATORY", strRequestNum, "1" ' OpenSubReport "NormalValueRangeFormat.rpt", "LABORATORY", strRequestNum, "1" ' End If ' End If ' ShowReportViewer False, "Department of Laboratory Medicine", blnDirect If gblRequestInfo.strFormType = "P" And gblRequestInfo.strLabSectionID = "FLW" Then OpenMainReport App.Path + "\LabPrint_Campath.RPT", "LABORATORY", strHospAdd, strRequestNum, CStr(gblResultInfo.intEntryMode) OpenSubReport "mm3", "LABORATORY", strRequestNum, CStr(gblResultInfo.intEntryMode) Else If gblRequestInfo.strFormType = "2" And gblRequestInfo.strLabSectionID = "CEL" Then OpenMainReport App.Path + "\LabPrint_Interpretation.RPT", "LABORATORY", _ strHospAdd, strRequestNum, CStr(gblResultInfo.intEntryMode) Else OpenMainReport App.Path + "\LabPrint_PreFormattedExams.RPT", "LABORATORY", _ strHospAdd, strRequestNum OpenSubReport "ShortForm.rpt", "LABORATORY", strRequestNum, CStr(gblResultInfo.intEntryMode) OpenSubReport "NormalValueFormat.rpt", "LABORATORY", strRequestNum, CStr(gblResultInfo.intEntryMode) OpenSubReport "ConversionFactor.rpt", "LABORATORY", strRequestNum, CStr(gblResultInfo.intEntryMode) OpenSubReport "SpecificColumn1.rpt", "LABORATORY", strRequestNum, CStr(gblResultInfo.intEntryMode) OpenSubReport "SpecificColumn2.rpt", "LABORATORY", strRequestNum, CStr(gblResultInfo.intEntryMode) OpenSubReport "NormalValueRangeFormat.rpt", "LABORATORY", strRequestNum, CStr(gblResultInfo.intEntryMode) End If End If ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_Lupus() OpenMainReport App.Path & "\LabPrint_Lupus.RPT", "LABORATORY", _ strHospTitle, strHospAdd, strEmployeeName, gblRequestInfo.strPathologist, strRequestNum ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_NormalValueFormat(Optional mSampleNum As String = "") OpenMainReport App.Path & "\HEM-QF-001.rpt", "LABORATORY", strCSNumber, mSampleNum ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_WithNormalValue() OpenMainReport App.Path & "\LabPrint_With_NormalValues.RPT", "LABORATORY", _ strHospAdd, strRequestNum, "1" OpenSubReport "Conversion", "LABORATORY", strRequestNum, "" OpenSubReport "SI", "LABORATORY", strRequestNum, "" ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_Fecalysis() OpenMainReport App.Path + "\LabPrint_Fecalysis.RPT", "LABORATORY", _ strHospAdd, strRequestNum ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_WithCutOff() If gblRequestInfo.strFormType = "5" Or gblRequestInfo.strFormType = "I" Or _ (gblRequestInfo.strFormType = "P" And gblRequestInfo.strValueType = "5") Or _ (gblRequestInfo.strFormType = "5" And gblRequestInfo.strValueType = "A") Or _ (gblRequestInfo.strFormType = "P" And gblRequestInfo.strValueType = "I") Or _ (gblRequestInfo.strFormType = "P" And gblRequestInfo.strValueType = "A") Then OpenMainReport App.Path & "\LabPrint_WithCutOff.RPT", "LABORATORY", _ strHospAdd, strRequestNum ElseIf gblRequestInfo.strFormType = "D" Or (gblRequestInfo.strFormType = "P" And gblRequestInfo.strValueType = "D") Then OpenMainReport App.Path & "\LabPrint_ShortFormWIthRemark.RPT", "LABORATORY", _ strHospAdd, strRequestNum, CStr(gblResultInfo.intEntryMode) ElseIf gblRequestInfo.strFormType = "W" Then OpenMainReport App.Path & "\LabPrint_Widal.RPT", "LABORATORY", strHospAdd, strRequestNum End If ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_BodyFluid() OpenMainReport App.Path & "\LabPrint_BodyFluid.RPT", "LABORATORY", _ strHospAdd, strRequestNum ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_ShortFormWithRemarks() If gblRequestInfo.strFormType = "5" Or gblRequestInfo.strFormType = "I" Or _ (gblRequestInfo.strFormType = "P" And gblRequestInfo.strValueType = "5") Or _ (gblRequestInfo.strFormType = "5" And gblRequestInfo.strValueType = "A") Or _ (gblRequestInfo.strFormType = "P" And gblRequestInfo.strValueType = "I") Or _ (gblRequestInfo.strFormType = "P" And gblRequestInfo.strValueType = "A") Then OpenMainReport App.Path & "\LabPrint_WithCutOff.RPT", "LABORATORY", _ strHospAdd, strRequestNum ElseIf gblRequestInfo.strFormType = "D" Or (gblRequestInfo.strFormType = "P" And gblRequestInfo.strValueType = "D") Then OpenMainReport App.Path & "\LabPrint_ShortFormWIthRemark.RPT", "LABORATORY", _ strHospAdd, strRequestNum, CStr(gblResultInfo.intEntryMode) ElseIf gblRequestInfo.strFormType = "W" Then OpenMainReport App.Path & "\LabPrint_Widal.RPT", "LABORATORY", strHospAdd, strRequestNum End If ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_WithInterpretation() OpenMainReport App.Path & "\LabPrint_WithInterpretation.RPT", "LABORATORY", _ strHospAdd, strRequestNum ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_SemenAnalysis() OpenMainReport App.Path + "\LabPrint_SemenAnalysis.RPT", "LABORATORY", _ strHospAdd, strRequestNum ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_SpermCount() OpenMainReport App.Path + "\LabPrint_SpermCount.RPT", "LABORATORY", _ strHospAdd, strRequestNum ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_ERAPRA() OpenMainReport App.Path & "\LabPrint_ERAPRA.RPT", "LABORATORY", strRequestNum ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_AFB() OpenMainReport App.Path & "\LabPrint_AFB.RPT", "LABORATORY", _ strHospAdd, strRequestNum ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_GramStain() OpenMainReport App.Path & "\GramStain.rpt", "LABORATORY", _ strHospAdd, strRequestNum ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_Typhidot() OpenMainReport App.Path & "\LabPrint_Typhidot.RPT", "LABORATORY", _ strHospAdd, strRequestNum ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_Cerb() OpenMainReport App.Path & "\LabPrint_Cerb.RPT", "LABORATORY", strRequestNum ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_Cytology() OpenMainReport App.Path & "\LabPrint_Cytology.rpt", "LABORATORY", _ strHospAdd, strEmployeeName, strRequestNum, "H", True ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_UrineWright() OpenMainReport App.Path & "\LabPrint_UrineWright.RPT", "LABORATORY", _ strHospTitle, strHospAdd, strEmployeeName, gblRequestInfo.strPathologist, strRequestNum ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_ABG() OpenMainReport App.Path & "\LabPrint_abg.RPT", "LABORATORY", _ strHospTitle, strHospAdd, strRequestNum ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_ANAPanel() OpenMainReport App.Path & "\ANAPanel.rpt", "LABORATORY", strRequestNum ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_ExecutivePanel() ' OpenMainReport App.Path & "\ExecutivePanel.rpt", "LABORATORY", _ ' strRequestNum, strProfileID, strExamName ' ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_OtherPanel() ' OpenMainReport App.Path & "\OtherPanel.rpt", "LABORATORY", _ ' strRequestNum, strExamid, strExamName ' ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_Microbiology() Dim rec As New ADODB.RecordSet Dim strFinal As String Dim strResult As String rec.Open "LABORATORY..Lab_GetResultMicrobiology '" & strRequestNum & "','2','','',''", _ dbConnection, adOpenDynamic, adLockReadOnly If Not rec.EOF Then strFinal = Trim(rec!FinalReport & "") strResult = Trim(rec!ResultS & "") + Trim(rec!ResultI & "") + Trim(rec!ResultR & "") End If rec.Close If strResult = "" Then If strFinal = "" Then OpenMainReport App.Path & "\LabPrint_PreMicro.rpt", "LABORATORY", strRequestNum, "2", "", "", "" ShowReportViewer False, "Result Preview", blnDirect Else OpenMainReport App.Path & "\LabPrint_FinalMicro.rpt", "LABORATORY", strRequestNum, "2", "", "", "" ShowReportViewer False, "Result Preview", blnDirect End If Else OpenMainReport App.Path & "\LabPrint_Microbiology.rpt", "LABORATORY", strRequestNum ShowReportViewer False, "Result Preview", blnDirect End If End Sub Public Sub Draw_SpecificFormat() If gblRequestInfo.strFormType = "P" And gblRequestInfo.strLabSectionID = "FLW" Then OpenMainReport App.Path + "\LabPrint_Campath.RPT", "LABORATORY", strHospAdd, strRequestNum, CStr(gblResultInfo.intEntryMode) OpenSubReport "mm3", "LABORATORY", strRequestNum, CStr(gblResultInfo.intEntryMode) Else If gblRequestInfo.strFormType = "2" And gblRequestInfo.strLabSectionID = "CEL" Then OpenMainReport App.Path + "\LabPrint_Interpretation.RPT", "LABORATORY", _ strHospAdd, strRequestNum, CStr(gblResultInfo.intEntryMode) Else OpenMainReport App.Path + "\LabPrint_PreFormattedExams.RPT", "LABORATORY", _ strHospAdd, strRequestNum OpenSubReport "ShortForm.rpt", "LABORATORY", strRequestNum, CStr(gblResultInfo.intEntryMode) OpenSubReport "NormalValueFormat.rpt", "LABORATORY", strRequestNum, CStr(gblResultInfo.intEntryMode) OpenSubReport "ConversionFactor.rpt", "LABORATORY", strRequestNum, CStr(gblResultInfo.intEntryMode) OpenSubReport "SpecificColumn1.rpt", "LABORATORY", strRequestNum, CStr(gblResultInfo.intEntryMode) OpenSubReport "SpecificColumn2.rpt", "LABORATORY", strRequestNum, CStr(gblResultInfo.intEntryMode) OpenSubReport "NormalValueRangeFormat.rpt", "LABORATORY", strRequestNum, CStr(gblResultInfo.intEntryMode) End If End If ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_MyCustom() OpenMainReport App.Path & "\LabPrint_Custom.rpt", "LABORATORY", _ strHospAdd, strRequestNum ShowReportViewer False, "Result Preview", blnDirect End Sub Public Sub Draw_NormalRange() ' Select Case intFormCode ' Case 0 '0 - Prothrombin Time ' OpenMainReport App.Path & "\ProthrombinTime.rpt", "LABORATORY", strRequestNum ' ShowReportViewer False, "Result Preview", blnDirect ' Case 1 '1 - Coomb's Test ' OpenMainReport App.Path & "\CoombsTest.rpt", "LABORATORY", strRequestNum ' ShowReportViewer False, "Result Preview", blnDirect ' Case 2 '2 - Bleeding and Clotting Time ' OpenMainReport App.Path & "\BleedingClottingTime.rpt", "LABORATORY", strRequestNum ' ShowReportViewer False, "Result Preview", blnDirect ' Case 3, 4, 5, 6 ' OpenMainReport App.Path & "\NormalRange.rpt", "LABORATORY", strRequestNum ' ShowReportViewer False, "Result Preview", blnDirect ' Case 7, 8, 9, 10, 11 ' OpenMainReport App.Path & "\NormalRangePanel.rpt", "LABORATORY", strRequestNum ' ShowReportViewer False, "Result Preview", blnDirect ' End Select End Sub Public Sub Print_Results(myForm As Form) On Error GoTo Hell: Dim recY As New ADODB.RecordSet Dim ictr As Integer With recY If .State > 0 Then .Close .CursorLocation = adUseClient .Open "truncate table laboratory..tbtempreqnum", dbConnection, adOpenDynamic, adLockOptimistic If .State > 0 Then .Close .CursorLocation = adUseClient For ictr = 1 To myForm.lvwExams.ListItems.Count If myForm.lvwExams.ListItems(ictr).Checked = True Then .Open "insert into laboratory..tbtempreqnum(requestnum) values('" & myForm.lvwExams.ListItems(ictr).SubItems(4) & "')", dbConnection, adOpenDynamic, adLockOptimistic If .State > 0 Then .Close End If Next ictr End With Set recY = Nothing Select Case gblRequestInfo.strFormType '*** Hard Coded Formats Case "H" Select Case gblRequestInfo.strValueType Case "B": Draw_Stone Case "U": Draw_Urinalysis Case "H": Draw_Histopath Case "P": Draw_Papsmear Case "C": Draw_Cytology Case "W": Draw_UrineWright Case "R": Draw_ABG Case "S": Draw_Stool Case "L": Draw_BodyFluid Case "T", "E", "O": Draw_Fecalysis Case "F": Draw_SemenAnalysis Case "2": Draw_WithInterpretation Case "K": Draw_GramStain Case "Y": Draw_ANAPanel Case "Z": Draw_ExecutivePanel Case "3": Draw_OtherPanel Case "4": Draw_AFB Case "I": Draw_Typhidot Case "A", "B": Draw_APTT Case Else MsgBox "Exam not yet formatted.", vbInformation + vbOKOnly, "Invalid Exam Format" Exit Sub End Select Case "P" Select Case gblRequestInfo.strValueType Case "5", "D", "I": Draw_WithCutOff Case "2", "3", "6": Draw_PreFormattedExams Case "1", "7", "8", "B": Draw_WithNormalValue Case Else MsgBox "Exam not yet formatted.", vbInformation + vbOKOnly, "Invalid Exam Format" End Select '*** Short Form With Result Case "D": Select Case gblRequestInfo.strValueType Case "5": Draw_WithCutOff Case "6": Draw_WithNormalValue Case Else: Call Draw_WithCutOff End Select '*** Culture and Sensitivity Format Case "J" Select Case gblRequestInfo.strValueType Case "1": Draw_Microbiology Case Else: Draw_CS End Select '***P = profile exams '***U = Normal Value Format (NKTI Format in Chemistry) '***1 = Normal Value without Conversion Factor '***2 = Short Form '***3 = Paragraph Format '***4 = Specific Format '***6 = Paragraph Form with Partial Entry '***7 = Normal Value Range Value (Female, Male) '***8 = Normal Value with Conversion factor (Female, Male) '***9 = Normal Value According to Age '***A = Normal Value Open Range '***B = Normal Value with Conversion Factor '***C = Short Form With NV but without Conversion Factor Case "2", "3", "6", "9": Draw_PreFormattedExams Case "4": Draw_SpecificFormat Case "1", "7", "8", "B": Draw_WithNormalValue Case "5", "W", "I": Draw_WithCutOff Case "X" Select Case gblRequestInfo.strValueType Case "1", "2": Draw_Crossmatching Case Else: Draw_Crossmatching End Select Case "K": Draw_MyCustom '*** HIV Format ***' Case "Z": Select Case gblRequestInfo.strValueType Case "1": Draw_HIV End Select Case Else MsgBox "Exam not yet formatted.", vbInformation + vbOKOnly, "Invalid Exam Format" Exit Sub End Select Exit Sub Hell: MsgBox Err.Description End Sub