SELECT mrd_no AS MrdNo, dtpRegDate AS CreatedDate, dtpRegDate AS created_at, cmbSuffix AS Suffix, txtLastName AS Lname, txtFirstName AS Fname, txtmiddlename AS Mname, PatientName AS PatientName, cmbgender AS Gender, txtDob AS Dob, txtAgeyear AS Age, txtaddress AS Address, Addr2 AS Address2, cmbCity AS City, cmbState AS State, txtmobile1 AS Phone, txtmobile2 AS Phone2, Lang AS Language, cmbconsultant AS ConsultantName, cmbreferby AS RefBy, txtAmount AS Fees, username AS Username, Checked AS Status, InTime AS InTime, year AS Year, txtagemonth AS AgeMonth, txtphone AS LandlinePhone, txtemail AS Email FROM NewPatient; ----------------------------------------------------------------------- SELECT RWNO AS VisitNo, MRD_NO AS MrdNo, PatientName AS PatientName, PatientType AS PatientType, Age AS Age, '' AS Gender, '' AS Cashless, '' AS Language, InDate AS InDate, InTime AS InTime, OutTime AS OutTime, Checked AS Checked, Consultant AS Consultant, '' AS ConsultantName, Dilated AS Dilated, '' AS DilatedAt, Dilatedtime AS DilatedTime, Amount AS Amount, '' AS PayMode, Username AS Username, 1 AS Status, 0 AS CreatedBy, InDate AS created_at, 0 AS ModifiedBy, '' AS updated_at, '' AS Diagnosis, Refer AS RefBy, '' AS Appointment, Visit AS OpdType, ConsUser AS ConfirmConsult, '' AS OptoId, '' AS ConfirmOpto, '' AS InvStName, '' AS PrevConsultant, 0 AS chkstatus FROM QueueList; ------------------------------------------------------- SELECT mrd_no AS MrdNo, VisitDate AS VisitDate, '' AS PatientName, VisitNo AS VisitNo, 0 AS Checked FROM visitdetails; --------------------------------------------------------------- SELECT mrd_no AS MrdNo, visitno AS VisitNo, visitdate AS VisitDate, ptname AS PatientName, age AS Age, gender AS Gender, txtcomplaints0 AS Complaint1, txtcomplaints1 AS Complaint2, txtcomplaints2 AS Complaint3, cmbcompdays1 AS CompDays1, cmbcompdays2 AS CompDays2, cmbcompdays3 AS CompDays3, cmbcompeye1 AS CompEyes1, cmbcompeye2 AS CompEyes2, cmbcompeye3 AS CompEyes3, cmbpasthistory AS PastHistory, chkdm AS ChkDm, chkht AS ChkHt, chkcad AS ChkCad, chkprostate AS ChkProst, chkcopd AS ChkCopd, '' AS ChkOther, txtothers AS TxtOther, txtdm AS DmFrom, txtht AS HtFrom, txtcad AS CadFrom, txtprostate AS ProstFrom, txtcopd AS CopdFrom, '' AS OtherFrom, cmbdm AS DmPeriod, cmbht AS HtPeriod, cmbcad AS CadPeriod, cmbprostate AS ProstPeriod, cmbcopd AS CopdPeriod, '' AS OtherPeriod, txtallergy AS AllergyHistory, txtocularhistory AS MedicalHistory, cmbaddiction AS Addictions, txtvision_re AS VaRe, '' AS VaReNear, txtpinhole_re AS VaPhRe, '' AS OgRe, txtvision_le AS VaLe, '' AS VaLeNear, txtpinhole_le AS VaPhLe, '' AS OgLe, txtpg_sphre AS PgSphRe, txtpg_cylre AS PgCylRe, txtpg_axisre AS PgAxisRe, txtpg_addre AS PgNearAddRe, txtpg_sphle AS PgSphLe, txtpg_cylle AS PgCylLe, txtpg_axisle AS PgAxisLe, txtpg_addle AS PgNearAddLe, txtrf_sphre AS SrSphRe, txtrf_cylre AS SrCylRe, txtrf_axisre AS SrAxisRe, txtrf_addre AS SrNearAddRe, txtrf_visionre AS SrVaGlassRe, txtrf_nearre AS SrNvRe, txtrf_sphle AS SrSphLe, txtrf_cylle AS SrCylLe, txtrf_axisle AS SrAxisLe, txtrf_addle AS SrNearAddLe, txtrf_visionle AS SrVaGlassLe, txtrf_nearle AS SrNvLe, cmbglasstype AS GlassType, cmbglassuses AS Uses, txtglassremark AS Remarks, dilated AS ChkDilate, referby AS RefBy, cmbcategory AS Category, dilated AS Dialated, eyetodilate AS DiaEye, txtiop_nctre AS IopNctRe, txtiop_nctle AS IopNctLe, txtiop_atre AS IopAtRe, txtiop_atle AS IopAtLe, txtar_sphre AS RefSphRe, txtar_cylre AS RefCylRe, txtar_axisre AS RefAxisRe, txtar_k1re AS RefK1Re, txtar_k1axisre AS RefK1AxisRe, txtar_k2re AS RefK2Re, txtar_k2axisre AS RefK2AxisRe, txtar_sphle AS RefSphLe, txtar_cylle AS RefCylLe, txtar_axisle AS RefAxisLe, txtar_k1le AS RefK1Le, txtar_k1axisle AS RefK1AxisLe, txtar_k2le AS RefK2Le, txtar_k2axisle AS RefK2AxisLe, txtarcyl_sphre AS CrSrSphRe, txtarcyl_cylre AS CrSrCylRe, txtarcyl_axisre AS CrSrAxisRe, txtarcyl_sphle AS CrSrSphLe, txtarcyl_cylle AS CrSrCylLe, txtarcyl_axisle AS CrSrAxisLe, username AS ConfirmOpto, 0 AS CreatedBy, visitdate AS created_at, 0 AS ModifiedBy, '' AS updated_at, 0 AS Checked FROM OPDOPTO; ------------------------------------------------------ SELECT mrd_no AS MrdNo, visitno AS VisitNo, visitdate AS VisitDate, ptname AS PatientName, '0' AS ChkReNormal, '0' AS ChkLeNormal, cmbocularre AS ReOcMov, cmbocularle AS LeOcMov, cmbbinacular AS BeOcMov, txtorbitalre AS OrbitalRe, txtorbitalle AS OrbitalLe, cmblidsre AS ReLids, cmblidsle AS LeLids, cmbconjre AS ReConj, cmbconjle AS LeConj, cmbcorneare AS ReCornea, cmbcorneale AS LeCornea, txtcornearemarkre AS ReCorneaRemark, txtcornearemarkle AS LeCorneaRemark, cmbacre AS ReAntChamber, cmbacle AS LeAntChamber, cmbirisre AS ReIris, cmbirisle AS LeIris, cmbpupilre AS RePupil, cmbpupille AS LePupil, txtatre AS ReIop, txtatle AS LeIop, cmblensre1 AS ReLens, cmblensle1 AS LeLens, cmblensre2 AS ReLens2, cmblensle2 AS LeLens2, cmbnlpre AS ReNlp, cmbnlple AS LeNlp, '0' AS ChkReHazy, '0' AS ChkLeHazy, txtfmedia0 AS ReMedia, txtfmedia1 AS LeMedia, txtfoptic0 AS ReOptDisc, txtfoptic1 AS LeOptDisc, '' AS ReMacBV, '' AS LeMacBV, '' AS ReBv, '' AS LeBv, '' AS ReMidPerPh, '' AS LeMidPerPh, '' AS InvStName, '' AS InvStBy, '' AS Amount, username AS CounCellingBy, CONCAT( txtdiagnosis0,' ', txtdiagnosis1,' ', txtdiagnosis2 ) AS Diagnosis, txtadvice AS Treatment, txtadviceremark AS Advice, CONCAT( txtfindingremark,' ', txtfindingremarkle ) AS Remark, '' AS ChkDilate, '' AS ChkCatProfile, '' AS ChkLasikProfile, 0 AS CreatedBy, visitdate AS created_at, 0 AS ModifiedBy, '' AS updated_at, '' AS CouncRemark, '0' AS Checked, 0 AS ReviewDay, '' AS Review, mskfollowdt AS AppointDate, '' AS AlRe, '' AS AlLe, '' AS WtwRe, '' AS WtwLe, '' AS PachyRe, '' AS PachyLe, '' AS IOL1, '' AS IOL2, '' AS IOL3, '' AS IOL4, '' AS IOL5, '' AS IOL6, '' AS VisionRe, '' AS VisionLe, '' AS NearRe, '' AS NearLe, txtbp AS BP, txtiop_nctre AS NctRe, txtiop_nctle AS NctLe, CONCAT( txtfundusremark,' ', txtfundusremarkle ) AS FundusRemark, txtreferto AS ReferTo, continueothertt AS ContinueTT, printglass AS PrintGls, '' AS DiagnosisRemark, '0' AS PrintReLe, '0' AS PageBreak, '0' AS FundusDraw, '' AS ConsDialated, '' AS ConsDiaEye, '' AS CostCoated, '0' AS DfFe, '' AS ClinicName, '' AS SpecDocName, '' AS AppTime, '' AS CmbPlanOfMang, '' AS CmbRemark FROM OPDCONSULTANT; ---------------------------------------------------------------- SELECT '' AS PatientId, MRD_NO AS MrdNo, PatientName AS PatientName, 0 AS ConsultantId, cmbConsultant AS Consultant, cmbProcedure AS Procedures, txtAmount AS Amount, cmbMode AS PayMode, txtCheckNo AS ChequeNo, txtnarr AS Narration, 1 AS Status, 0 AS CreatedBy, dtpDate AS CreatedDate, 0 AS ModifiedBy, dtpDate AS ModifiedDate FROM ReceiptEntry; --------------------------------------------------------------------