Exemple #1
0
        public static Appointment CreateAppointmentFromRecall(Recall recall, Patient pat, DateTime aptDateTime, long opNum, long provNum)
        {
            RecallType  recallType = RecallTypes.GetFirstOrDefault(x => x.RecallTypeNum == recall.RecallTypeNum);
            Appointment appt       = CreateAppointment(pat.PatNum, aptDateTime, opNum, provNum, pattern: recallType.TimePattern, clinicNum: pat.ClinicNum);

            foreach (string procCode in RecallTypes.GetProcs(recallType.RecallTypeNum))
            {
                ProcedureT.CreateProcedure(pat, procCode, ProcStat.TP, "", 50, appt.AptDateTime, provNum: provNum, aptNum: appt.AptNum);
            }
            return(appt);
        }
Exemple #2
0
 /// <summary>Creates patient objects corresponding to the totalPat parameter. Each patient has a procedure
 /// and statement created on the specified date. Aging is run for each patient.</summary>
 public static void CreatePatWithProcAndStatement(int totalPat, DateTime dateTimeSentStmt = default(DateTime), bool hasPortalAccessInfo = false,
                                                  PatientStatus patStatus = PatientStatus.Patient, StatementMode stmtMode = StatementMode.Mail, bool hasSignedTil = false, double procFee = 0)
 {
     for (int i = 0; i < totalPat; i++)
     {
         Patient  patient  = CreatePatient("", 0, 0, "", "", ContactMethod.Email, "", "", "", default(DateTime), 0, 0, hasPortalAccessInfo, patStatus, hasSignedTil);
         DateTime dateProc = DateTime.Today.AddDays(-1);
         //Create a completed procedure that was completed the day before the first payplan charge date AND before the payment plan creation date.
         ProcedureT.CreateProcedure(patient, "D1100", ProcStat.C, "", procFee, dateProc);
         //Run Ledgers to update the patient balance from the procedure fee
         Ledgers.ComputeAging(patient.PatNum, dateTimeSentStmt);
         //Insert a statement that was sent during the "bill in advance days" for the payment plan charge AND before the payment plan creation date.
         StatementT.CreateStatement(patient.PatNum, mode_: stmtMode, isSent: true, dateSent: dateTimeSentStmt);
     }
 }
Exemple #3
0
        ///<summary>Creates insurance and completed procedures prior to creating a claim with given claimType and claimIdentifier.</summary>
        public static Claim SetupEraClaim(Patient pat, List <EraTestProcCodeData> listProcCodes, string claimType, string claimIdentifier, out List <InsuranceInfo> listInsuranceInfo)
        {
            listInsuranceInfo = new List <InsuranceInfo>();
            //Create Insurance
            InsuranceInfo insuranceInfoPercentage = InsuranceT.AddInsurance(pat, "PrimaryCarrier");                    //non-ppo
            InsuranceInfo insuranceInfoPPO        = InsuranceT.AddInsurance(pat, "SecondaryCarrier", "p", ordinal: 2); //PPO, currently not used.

            listInsuranceInfo.Add(insuranceInfoPercentage);
            listInsuranceInfo.Add(insuranceInfoPPO);
            //Create and complete procedures.
            List <Procedure> listProcs = new List <Procedure>();

            foreach (EraTestProcCodeData data in listProcCodes)
            {
                Procedure proc = ProcedureT.CreateProcedure(pat, data.ProcCode, data.ProcStatus, "0", data.ProcFee, data.ProcDateTime);
                ProcedureT.SetComplete(proc, pat, insuranceInfoPercentage);              //Does not create claimProcs if they are backdated.
                listProcs.Add(proc);
            }
            //Create claim
            return(ClaimT.CreateClaim(listProcs, insuranceInfoPercentage, claimType, claimIdentifier));        //Creates missing claimProcs, uses procDate, claimIdentifier from ERA.
        }