コード例 #1
0
        /**
         * \brief <b>Brief Description</b> Patient - Constructor <b><i>class method</i></b> - This method is used to instantiate a new Patient object with given a set of attribute values.
         * \details <b>Details</b>
         *
         * Constructor for the Patient class, it gets the Demographics class object assign it to the local variables to use so it can use the demographic class method to get access to the patient roster. and here patient class constructor also getting the string array which contain patient inflammation which came from database
         *
         * \param d - <b>Demographics</b> - This is object of demographic class which Patient class will use to access patient roster.
         *
         * \param patientRecord - <b>string[]</b> - This is a String array which contain the patient information which will used to create a Patient object.
         *
         * \param isNew - <b>bool</b> this the bool that indicates that is this a new patient object or not.
         *
         * \return As This is a <i>constructor</i> for the Patient class, nothing is returned
         *
         */
        public Patient(Demographics d, string[] patientRecord, bool isNew = false)
        {
            Logging.Log("Patient", "Patient", "Initialize the Patient object with preexisting Patient data");
            demographics = d;
            int i = 0;

            if (isNew)
            {
                PatientID = FileIO.GenerateTableID(FileIO.TableNames.Patients);
            }
            else
            {
                PatientID = Int32.Parse(patientRecord[i++]);
            }
            FirstName    = patientRecord[i++];
            LastName     = patientRecord[i++];
            HCN          = patientRecord[i++];
            MInitial     = patientRecord[i++];
            DateOfBirth  = patientRecord[i++];
            Sex          = patientRecord[i++];
            HeadOfHouse  = patientRecord[i++];
            AddressLine1 = patientRecord[i++];
            AddressLine2 = patientRecord[i++];
            City         = patientRecord[i++];
            Province     = patientRecord[i++];
            PhoneNum     = patientRecord[i++];
        }
コード例 #2
0
 /**
  * \brief <b>Brief Description</b> Patient - Constructor <b><i>class method</i></b> - This method is used to instantiate a new Patient object with given a set of attribute values.
  * \details <b>Details</b>
  *
  * Constructor for the Patient class, it gets the Demographics class object assign it to the local variables to use so it can use the demographic class method to get access to the patient roster.
  *
  * \param d - <b>Demographics</b> - This is object of demographic class which Patient class will use to access patient roster.
  *
  * \return As This is a <i>constructor</i> for the Patient class, nothing is returned
  *
  */
 public Patient(Demographics d = null)
 {
     if (d == null)
     {
         d = new Demographics();
     }
     Logging.Log("Patient", "Patient", "Initializing New the Patient object with default constructor");
     demographics = d;
     // default constructor
     _patientID = -1;
 }
コード例 #3
0
 /**
  * \brief <b>Brief Description</b> Patient - Constructor <b><i>class method</i></b> - This method is used to instantiate a new Patient object with given a set of attribute values.
  * \details <b>Details</b>
  *
  * Constructor for the Patient class, it gets the Demographics class object assign it to the local variables to use so it can use the demographic class method to get access to the patient roster.
  *
  * \param d - <b>Demographics</b> - This is object of demographic class which Patient class will use to access patient roster.
  *
  * \return As This is a <i>constructor</i> for the Patient class, nothing is returned
  *
  */
 public Patient(Demographics d = null)
 {
     if (d == null)
     {
         d = new Demographics();
     }
     Logging.Log("Patient", "Patient", "Initializing New the Patient object with default constructor");
     this.DateOfBirth = DateTime.Now.AddDays(-1);
     demographics     = d;
     // default constructor
     _patientID = -1;
 }
コード例 #4
0
        /**
         * \brief <b>Brief Description</b> - Billing<b> <i>class method</i></b> - This will generate a monthly billing file
         * \details <b>Details</b>
         *
         * This will generate a monthly billing by searching throuhg the applications data file. The file will be used by the
         * Ministry of Health to provide payment to the clinic. The method will read all appointments and patient information gathering
         * the appropriate billing code from the data file. The process will  be able to look up and apply a fee from the fee schedule file
         *  provided by the Ministry of Health against all billable encounters. The output file will be in CSV format.
         *
         * \return none - <b>void</b> - this method returns nothing
         *
         */
        public bool GenerateMonthlyBillingFile(Scheduling schedule, Demographics demo, int year, int month)
        {
            List <string> billingFileInfo = new List <string>();
            string        tmp;
            Patient       patient;

            try
            {
                foreach (Appointment a in schedule.GetAppointmentsByMonth(new DateTime(year, month, 1)))
                {
                    foreach (ApptBillRecord abr in appointmentBillingRecords)
                    {
                        if (a.AppointmentID.ToString() == abr.AppointmentID)
                        {
                            patient = demo.GetPatientByID(Int32.Parse(abr.PatientID));
                            if (patient.ResponseCode != "PUNKO")
                            {
                                tmp  = schedule.GetDateByAppointmentID(a.AppointmentID).ToString("yyyyMMdd");
                                tmp += patient.HCN;
                                tmp += patient.Sex;
                                tmp += abr.BillingCode;
                                tmp += (allBillingCodes[abr.BillingCode].Cost * 10000).ToString("00000000000");

                                billingFileInfo.Add(tmp);
                            }
                        }
                    }
                }

                if (FileIO.SaveToFile(string.Format(@"Reports/{0}{1}MonthlyBillingFile", year, month), billingFileInfo))
                {
                    Logging.Log("Billing", "GenerateMonthlyBillingFile", ("Generated Monthly Billing File for YEAR: " + year + " and Month: " + month));
                    return(true);
                }
                else
                {
                    Logging.Log("Billing", "GenerateMonthlyBillingFile", "FAILED GENERATING MONTHLY BILLING FILE");
                    return(false);
                }
            }
            catch (Exception e)
            {
                Logging.Log(e, "Billing", "GenerateMonthlyBillingFile", "FAILED GENERATING MONTHLY BILLING FILE-EXCEPTION HIT");
                return(false);
            }
        }
コード例 #5
0
        /**
         * \brief <b>Brief Description</b> Patient - Constructor <b><i>class method</i></b> - This method is used to instantiate a new Patient object with given a set of attribute values.
         * \details <b>Details</b>
         *
         * Constructor for the Patient class, it gets the Demographics class object assign it to the local variables to use so it can use the demographic class method to get access to the patient roster. and here patient class constructor also getting the string array which contain patient inflammation which came from database
         *
         * \param d - <b>Demographics</b> - This is object of demographic class which Patient class will use to access patient roster.
         *
         * \param patientRecord - <b>string[]</b> - This is a String array which contain the patient information which will used to create a Patient object.
         *
         * \param ID - <b>int</b> - this is a integer which contains the PatientID of Patient In database
         *
         * \return As This is a <i>constructor</i> for the Patient class, nothing is returned
         *
         */
        public Patient(Demographics d, string[] patientRecord, int ID)
        {
            Logging.Log("Patient", "Patient", "Initialize the Patient object with preexisting Patient data");
            demographics = d;
            int i = 0;

            PatientID    = ID;
            FirstName    = patientRecord[i++];
            LastName     = patientRecord[i++];
            HCN          = patientRecord[i++];
            MInitial     = patientRecord[i++];
            DateOfBirth  = patientRecord[i++];
            Sex          = patientRecord[i++];
            HeadOfHouse  = patientRecord[i++];
            AddressLine1 = patientRecord[i++];
            AddressLine2 = patientRecord[i++];
            City         = patientRecord[i++];
            Province     = patientRecord[i++];
            PhoneNum     = patientRecord[i++];
        }
コード例 #6
0
ファイル: Billing.cs プロジェクト: developeramarish/EMS
        /**
         * \brief <b>Brief Description</b> - Billing<b> <i>class method</i></b> - This will analyze the response file sent from the Ministry of Health.
         * \details <b>Details</b>
         *
         * The Ministry of Health will provide a response file to any submitted MonthlyBillingFile. The file will be analyzed to look for
         * codes sent back from the ministry. It will look for codes; <i>PAID</i>, <i>DECL(Declined)</i>, <i>FHCV(Failed Validation)</i>, <i>CMOH(Contact MoH)</i>.
         * It will update the monthly summary and will also flag the appointments for review if the code sent back is <b>FHCV</b> or <b>CMOH</b>.
         *
         * \return - <b>List<string></string></b> - this method will return the summarized monthly bill summary
         */
        public List <string> ReconcileMonthlyBilling(string monthFilePath = "govFile.txt")
        {
            string tmpYear  = monthFilePath.Substring(0, 4);
            string tmpMonth = monthFilePath.Substring(4, 2);

            double totalBilled  = 0;
            double totalRcvd    = 0;
            int    totalFlagged = 0;
            Dictionary <string, string[]> reconciledAppointment = FileIO.GetTableFromFile(monthFilePath, FileIO.FileInputFormat.GovernmentResponse);

            Dictionary <string, double> theSummary = new Dictionary <string, double>();
            List <string> theSummaryDisplayed      = new List <string>();

            theSummary.Add("TotalEncounters", reconciledAppointment.Count);

            foreach (KeyValuePair <string, string[]> data in reconciledAppointment)
            {
                try
                {
                    totalBilled = totalBilled + (Convert.ToDouble(data.Value[4]));
                    if (data.Value[5] == "PAID")
                    {
                        totalRcvd = totalRcvd + (Convert.ToDouble(data.Value[4]));
                    }
                    else if (data.Value[5] == "FHCV" || data.Value[5] == "CMOH")
                    {
                        totalFlagged++;
                        flaggedEncounters.Add(data.Value);
                    }
                }
                catch (FormatException f) { Logging.Log(f, "Billing", "ReconcileMonthlyBilling", "FAILED CONVERTING STRING TO DOUBLE - EXCEPTION"); }
                catch (OverflowException o) { Logging.Log(o, "Billing", "ReconcileMonthlyBilling", "FAILED CONVERTING STRING TO DOUBLE - EXCEPTION"); }
            }
            totalBilled = totalBilled / 10000;
            totalRcvd   = totalRcvd / 10000;

            theSummary.Add("TotalBilled", totalBilled);
            theSummaryDisplayed.Add("Total Billed : " + totalBilled.ToString());

            theSummary.Add("TotalReceived", totalRcvd);
            theSummaryDisplayed.Add("Total Received : " + totalRcvd.ToString());

            theSummary.Add("ReceivedPercentage", ((totalRcvd / totalBilled) * 100));
            theSummaryDisplayed.Add("Received Percentage : " + ((totalRcvd / totalBilled) * 100).ToString());

            theSummary.Add("AverageBilling", (totalRcvd / reconciledAppointment.Count));
            theSummaryDisplayed.Add("Average Billing : " + (totalRcvd / reconciledAppointment.Count).ToString());

            theSummary.Add("NumberOfFollowUps", totalFlagged);
            theSummaryDisplayed.Add("Number of Follow Ups : " + totalFlagged.ToString());

            Demographics demographics = new Demographics();

            foreach (string[] s in flaggedEncounters)
            {
                Patient p = demographics.GetPatientByHCN(s[1]);
                if (p != null)
                {
                    theSummaryDisplayed.Add(string.Format("{0} - {1},{2} - {3}", s[0], p.LastName, p.FirstName, s[3]));
                }
            }

            Logging.Log("Billing", "ReconcileMonthlyBilling", ("Summary displayed for Month: " + tmpMonth + " Year: " + tmpYear));
            return(theSummaryDisplayed);
        }