public Patient(int patient_id, int person_id, DateTime patient_date_added, bool is_clinic_patient, bool is_gp_patient, bool is_deleted, bool is_deceased, string flashing_text, int flashing_text_added_by, DateTime flashing_text_last_modified_date, string private_health_fund, string concession_card_number, DateTime concession_card_expiry_date, bool is_diabetic, bool is_member_diabetes_australia, DateTime diabetic_assessment_review_date, int ac_inv_offering_id, int ac_pat_offering_id, string login, string pwd, bool is_company, string abn, string next_of_kin_name, string next_of_kin_relation, string next_of_kin_contact_info) { this.patient_id = patient_id; this.person = new Person(person_id); this.patient_date_added = patient_date_added; this.is_clinic_patient = is_clinic_patient; this.is_gp_patient = is_gp_patient; this.is_deleted = is_deleted; this.is_deceased = is_deceased; this.flashing_text = flashing_text; this.flashing_text_added_by = flashing_text_added_by == -1 ? null : new Staff(flashing_text_added_by); this.flashing_text_last_modified_date = flashing_text_last_modified_date; this.private_health_fund = private_health_fund; this.concession_card_number = concession_card_number; this.concession_card_expiry_date = concession_card_expiry_date; this.is_diabetic = is_diabetic; this.is_member_diabetes_australia = is_member_diabetes_australia; this.diabetic_assessment_review_date = diabetic_assessment_review_date; this.ac_inv_offering = ac_inv_offering_id == -1 ? null : new Offering(ac_inv_offering_id); this.ac_pat_offering = ac_pat_offering_id == -1 ? null : new Offering(ac_pat_offering_id); this.login = login; this.pwd = pwd; this.is_company = is_company; this.abn = abn; this.next_of_kin_name = next_of_kin_name; this.next_of_kin_relation = next_of_kin_relation; this.next_of_kin_contact_info = next_of_kin_contact_info; }
public Stock(int stock_id, int organisation_id, int offering_id, int qty, int warning_amt) { this.stock_id = stock_id; this.organisation = new Organisation(organisation_id); this.offering = new Offering(offering_id); this.qty = qty; this.warning_amt = warning_amt; }
public OrganisationOfferings(int organisation_offering_id, int organisation_id, int offering_id, decimal price, DateTime date_active) { this.organisation_offering_id = organisation_offering_id; this.organisation = new Organisation(organisation_id); this.offering = new Offering(offering_id); this.price = price; this.date_active = date_active; }
public static Offering[] GetAll(bool isAgedCareResidentTypes, string offering_invoice_type_ids = null, string offering_type_ids = null, bool showDeleted = false, string matchNname = "", bool searchNameOnlyStartsWith = false) { DataTable tbl = GetDataTable(isAgedCareResidentTypes, offering_invoice_type_ids, offering_type_ids, showDeleted, matchNname, searchNameOnlyStartsWith); Offering[] list = new Offering[tbl.Rows.Count]; for (int i = 0; i < tbl.Rows.Count; i++) list[i] = LoadAll(tbl.Rows[i]); return list; }
public StaffOfferings(int staff_offering_id, int staff_id, int offering_id, bool is_commission, decimal commission_percent, bool is_fixed_rate, decimal fixed_rate, DateTime date_active) { this.staff_offering_id = staff_offering_id; this.staff = new Staff(staff_id); this.offering = new Offering(offering_id); this.is_commission = is_commission; this.commission_percent = commission_percent; this.is_fixed_rate = is_fixed_rate; this.fixed_rate = fixed_rate; this.date_active = date_active; }
public StockUpdateHistory(int stock_update_history_id, int organisation_id, int offering_id, int qty_added, bool is_created, bool is_deleted, int added_by, DateTime date_added) { this.stock_update_history_id = stock_update_history_id; this.organisation = new Organisation(organisation_id); this.offering = new Offering(offering_id); this.qty_added = qty_added; this.is_created = is_created; this.is_deleted = is_deleted; this.added_by = added_by == -1 ? null : new Staff(added_by); this.date_added = date_added; }
public InvoiceLine(int invoice_line_id, int invoice_id, int patient_id, int offering_id, decimal quantity, decimal price, decimal tax, string area_treated, string service_reference, int offering_order_id) { this.invoice_line_id = invoice_line_id; this.invoice_id = invoice_id; this.patient = new Patient(patient_id); this.offering = offering_id == -1 ? null : new Offering(offering_id); this.quantity = quantity; this.price = price; this.tax = tax; this.area_treated = area_treated; this.service_reference = service_reference; this.offering_order = offering_order_id == -1 ? null : new OfferingOrder(offering_order_id); }
public BookingPatientOffering(int booking_patient_offering_id, int booking_patient_id, int offering_id, int quantity, int added_by, DateTime added_date, bool is_deleted, int deleted_by, DateTime deleted_date, string area_treated) { this.booking_patient_offering_id = booking_patient_offering_id; this.booking_patient = booking_patient_id == -1 ? null : new BookingPatient(booking_patient_id); this.offering = offering_id == -1 ? null : new Offering(offering_id); this.quantity = quantity; this.added_by = added_by == -1 ? null : new Staff(added_by); this.added_date = added_date; this.is_deleted = is_deleted; this.deleted_by = deleted_by == -1 ? null : new Staff(deleted_by); this.deleted_date = deleted_date; this.area_treated = area_treated; }
public OfferingOrder(int offering_order_id, int offering_id, int organisation_id, int staff_id, int patient_id, int quantity, DateTime date_ordered, DateTime date_filled, DateTime date_cancelled, string descr) { this.offering_order_id = offering_order_id; this.offering = new Offering(offering_id); this.organisation = new Organisation(organisation_id); this.staff = new Staff(staff_id); this.patient = new Patient(patient_id); this.quantity = quantity; this.date_ordered = date_ordered; this.date_filled = date_filled; this.date_cancelled = date_cancelled; this.descr = descr; }
public Booking(int booking_id, int entity_id, DateTime date_start, DateTime date_end, int organisation_id, int provider, int patient_id, int offering_id, int booking_type_id, int booking_status_id, int booking_unavailability_reason_id, int added_by, DateTime date_created, int booking_confirmed_by_type_id, int confirmed_by, DateTime date_confirmed, int deleted_by, DateTime date_deleted, int cancelled_by, DateTime date_cancelled, bool is_patient_missed_appt, bool is_provider_missed_appt, bool is_emergency, bool need_to_generate_first_letter, bool need_to_generate_last_letter, bool has_generated_system_letters, DateTime arrival_time, string sterilisation_code, int informed_consent_added_by, DateTime informed_consent_date, bool is_recurring, DayOfWeek recurring_day_of_week, TimeSpan recurring_start_time, TimeSpan recurring_end_time, int note_count, int inv_count) { this.booking_id = booking_id; this.entity_id = entity_id; this.date_start = date_start; this.date_end = date_end; this.organisation = organisation_id == 0 ? null : new Organisation(organisation_id); this.provider = provider == -1 ? null : new Staff(provider); this.patient = patient_id == -1 ? null : new Patient(patient_id); this.offering = offering_id == -1 ? null : new Offering(offering_id); this.booking_type_id = booking_type_id; this.booking_status = booking_status_id == -2 ? null : new IDandDescr(booking_status_id); this.booking_unavailability_reason = booking_unavailability_reason_id == -1 ? null : new IDandDescr(booking_unavailability_reason_id); this.added_by = added_by == -1 ? null :new Staff(added_by); this.date_created = date_created; this.booking_confirmed_by_type = booking_confirmed_by_type_id == -1 ? null : new IDandDescr(booking_confirmed_by_type_id); this.confirmed_by = confirmed_by == -1 ? null : new Staff(confirmed_by); this.date_confirmed = date_confirmed; this.deleted_by = deleted_by == -1 ? null : new Staff(deleted_by); this.date_deleted = date_deleted; this.cancelled_by = cancelled_by == -1 ? null : new Staff(cancelled_by); this.date_cancelled = date_cancelled; this.is_patient_missed_appt = is_patient_missed_appt; this.is_provider_missed_appt = is_provider_missed_appt; this.is_emergency = is_emergency; this.need_to_generate_first_letter = need_to_generate_first_letter; this.need_to_generate_last_letter = need_to_generate_last_letter; this.has_generated_system_letters = has_generated_system_letters; this.arrival_time = arrival_time; this.sterilisation_code = sterilisation_code; this.informed_consent_added_by = informed_consent_added_by == -1 ? null : new Staff(informed_consent_added_by); this.informed_consent_date = informed_consent_date; this.is_recurring = is_recurring; this.recurring_day_of_week = recurring_day_of_week; this.recurring_start_time = recurring_start_time; this.recurring_end_time = recurring_end_time; this.note_count = note_count; this.inv_count = inv_count; }
public PatientHistory(int patient_history_id, int patient_id, bool is_clinic_patient, bool is_gp_patient, bool is_deleted, bool is_deceased, string flashing_text, int flashing_text_added_by, DateTime flashing_text_last_modified_date, string private_health_fund, string concession_card_number, DateTime concession_card_expiry_date, bool is_diabetic, bool is_member_diabetes_australia, DateTime diabetic_assessment_review_date, int ac_inv_offering_id, int ac_pat_offering_id, string login, string pwd, bool is_company, string abn, string next_of_kin_name, string next_of_kin_relation, string next_of_kin_contact_info, int title_id, string firstname, string middlename, string surname, string nickname, string gender, DateTime dob, int modified_from_this_by, DateTime date_added) { this.patient_history_id = patient_history_id; this.patient = new Patient(patient_id); this.is_clinic_patient = is_clinic_patient; this.is_gp_patient = is_gp_patient; this.is_deleted = is_deleted; this.is_deceased = is_deceased; this.flashing_text = flashing_text; this.flashing_text_added_by = new Staff(flashing_text_added_by); this.flashing_text_last_modified_date = flashing_text_last_modified_date; this.private_health_fund = private_health_fund; this.concession_card_number = concession_card_number; this.concession_card_expiry_date = concession_card_expiry_date; this.is_diabetic = is_diabetic; this.is_member_diabetes_australia = is_member_diabetes_australia; this.diabetic_assessment_review_date = diabetic_assessment_review_date; this.ac_inv_offering = ac_inv_offering_id == -1 ? null : new Offering(ac_inv_offering_id); this.ac_pat_offering = ac_pat_offering_id == -1 ? null : new Offering(ac_pat_offering_id); this.login = login; this.pwd = pwd; this.is_company = is_company; this.abn = abn; this.next_of_kin_name = next_of_kin_name; this.next_of_kin_relation = next_of_kin_relation; this.next_of_kin_contact_info = next_of_kin_contact_info; this.title = new IDandDescr(title_id); this.firstname = firstname; this.middlename = middlename; this.surname = surname; this.nickname = nickname; this.gender = gender; this.dob = dob; this.modified_from_this_by = new Staff(modified_from_this_by); this.date_added = date_added; }
public BookingPatient(int booking_patient_id, int booking_id, int patient_id, int entity_id, int offering_id, string area_treated, int added_by, DateTime added_date, bool is_deleted, int deleted_by, DateTime deleted_date, bool need_to_generate_first_letter, bool need_to_generate_last_letter, bool has_generated_system_letters, int note_count) { this.booking_patient_id = booking_patient_id; this.booking = booking_id == -1 ? null : new Booking(booking_id); this.patient = patient_id == -1 ? null : new Patient(patient_id); this.entity_id = entity_id; this.offering = offering_id == -1 ? null : new Offering(offering_id); this.area_treated = area_treated; this.added_by = added_by == -1 ? null : new Staff(added_by); this.added_date = added_date; this.is_deleted = is_deleted; this.deleted_by = deleted_by == -1 ? null : new Staff(deleted_by); this.deleted_date = deleted_date; this.need_to_generate_first_letter = need_to_generate_first_letter; this.need_to_generate_last_letter = need_to_generate_last_letter; this.has_generated_system_letters = has_generated_system_letters; this.note_count = note_count; }
public void UpdateMultipliersForOffering(Offering offering) { hitSplashMultiplier += offering.hitSplashMultiplier; hitPhysicalMultiplier += offering.hitPhysicalMultiplier; splashRadiusModifier += offering.splashRadiusModifier; fireConversionRate += offering.fireConversionRate; earthConversionRate += offering.earthConversionRate; coldConversionRate += offering.coldConversionRate; statusEffectDuration += offering.statuseffectDuration; globalStatusChance += offering.statusEffectChance; }
private void SpawnDropItem(Offering dropItem) { Vector3 dropPosition = this.transform.position; dropPosition.y = 0.25f; Vector3 rotation = new Vector3(45,0,0); DropItem item = Instantiate(LevelController.Instance.dropItemPrefab, dropPosition, Quaternion.Euler(rotation)) as DropItem; item.SetDropItem(dropItem); }
public static Offering[] GetAllNotInc(Offering[] excList) { DataTable tbl = GetDataTable_AllNotInc(excList); return LoadFull(tbl); }
protected OfferingException(string message, Offering offering) : base(message) { this.Offering = offering; }
public OfferingAlreadyExistsException(Offering offering) : base(null, offering) { }
public static Offering[] GetOfferingsByOrg(bool only_active, string organisation_ids, string offering_invoice_type_ids = null, string offering_type_ids = null) { DataTable tbl = GetDataTable_OfferingsByOrg(only_active, organisation_ids, offering_invoice_type_ids, offering_type_ids); Offering[] list = new Offering[tbl.Rows.Count]; for (int i = 0; i < tbl.Rows.Count; i++) list[i] = OfferingDB.LoadAll(tbl.Rows[i]); return list; }
public static Offering[] GetOfferingsByOrg(string organisation_ids) { DataTable tbl = GetDataTable_OfferingsByOrg(organisation_ids); Offering[] list = new Offering[tbl.Rows.Count]; for (int i = 0; i < tbl.Rows.Count; i++) list[i] = OfferingDB.LoadAll(tbl.Rows[i]); return list; }
public void SetDropItem(Offering dropItem) { item = dropItem; }
public InvoiceType GetInvoiceType(Offering offering = null, Patient patient = null) { return GetInvoiceType( HealthCardDB.GetActiveByPatientID((patient == null ? this.Patient : patient).PatientID), offering == null ? this.Offering : offering, patient == null ? this.Patient : patient, null, null, -1); }
public static Offering[] LoadFull(DataTable tbl) { Offering[] list = new Offering[tbl.Rows.Count]; for (int i = 0; i < tbl.Rows.Count; i++) list[i] = LoadAll(tbl.Rows[i]); return list; }
/// <summary> /// Adds a Offering to the collection. /// </summary> /// <param name="offering">The offering to add.</param> public void Add(Offering offering) { //offering.Owner = this; List.Add(offering); }
protected string[] GetProviderData(Site site, Offering selectedOffering, DateTime fromDate, DateTime endDate, Staff staff, Organisation org, RegisterStaff registerStaff, Booking[] bookings = null, bool incClinic = false) { int d = 0; string[] data = new string[(int)endDate.Subtract(fromDate).TotalDays + 2 + (incClinic ? 1 : 0)]; if (incClinic) { data[d] = org.Name; d++; } data[d] = staff.Person.FullnameWithoutMiddlename; d++; data[d] = staff.Field.Descr; d++; Organisation[] orgs = new Organisation[] { org }; Staff[] providers = new Staff[] { staff }; if (bookings == null) bookings = BookingDB.GetBetween(fromDate, endDate, providers, orgs, null, null); // seperate into // - individual bookings that can be retrieved by date // - recurring bookings that can be retrieved by day of week Hashtable bkRecurringHash = new Hashtable(); Hashtable bkDateHash = new Hashtable(); foreach (Booking curBooking in bookings) { if (curBooking.Provider != null && curBooking.Provider.StaffID != staff.StaffID) continue; //if (curBooking.Organisation != null && curBooking.Organisation.OrganisationID != orgs[0].OrganisationID) // continue; if (!curBooking.IsRecurring) { if (bkDateHash[curBooking.DateStart.Date] == null) bkDateHash[curBooking.DateStart.Date] = new ArrayList(); if (IsWorkingToday(curBooking.DateStart.DayOfWeek, registerStaff)) ((ArrayList)bkDateHash[curBooking.DateStart.Date]).Add(curBooking); } else // curBooking.IsRecurring { if (bkRecurringHash[curBooking.RecurringDayOfWeek] == null) bkRecurringHash[curBooking.RecurringDayOfWeek] = new ArrayList(); if (IsWorkingToday(curBooking.RecurringDayOfWeek, registerStaff)) ((ArrayList)bkRecurringHash[curBooking.RecurringDayOfWeek]).Add(curBooking); } } for (DateTime curDate = fromDate; curDate < endDate; curDate = curDate.AddDays(1), d++) { Tuple<DateTime, DateTime> startEndTime = GetStartEndTime(curDate, orgs[0], site); Tuple<DateTime, DateTime> orgLunchTime = GetOrgLunchStartTime(curDate, orgs[0]); Booking[] todayBookings = bkDateHash[curDate] == null ? new Booking[] { } : (Booking[])((ArrayList)bkDateHash[curDate]).ToArray(typeof(Booking)); Booking[] todayRecurring = bkRecurringHash[curDate.DayOfWeek] == null ? new Booking[] { } : (Booking[])((ArrayList)bkRecurringHash[curDate.DayOfWeek]).ToArray(typeof(Booking)); if (IsWorkingToday(curDate.DayOfWeek, registerStaff) && IsClinicOpenToday(curDate, orgs[0])) { //foreach (Booking curBooking in todayBookings) // output1 += "<tr><td></td><td>" + curBooking.BookingID + "</td><td>" + curBooking.BookingTypeID + "</td><td style=\"white-space:nowrap;\">" + (curBooking.Organisation == null ? "" : curBooking.Organisation.Name) + "</td><td style=\"white-space:nowrap;\">" + (curBooking.Provider == null ? "" : curBooking.Provider.Person.FullnameWithoutMiddlename) + "</td><td style=\"white-space:nowrap;\">" + curBooking.DateStart.ToString("dd MMM yyyy") + "</td><td style=\"white-space:nowrap;\">" + "[" + curBooking.DateStart.ToString("HH:mm") + " - " + curBooking.DateEnd.ToString("HH:mm") + "]" + "</td></tr>"; // //foreach (Booking curBooking in todayRecurring) // if (curDate >= curBooking.DateStart.Date && curDate <= curBooking.DateEnd.Date) // output1 += "<tr><td> <b>R</b> </td><td>" + curBooking.BookingID + "</td><td>" + curBooking.BookingTypeID + "</td><td style=\"white-space:nowrap;\">" + (curBooking.Organisation == null ? "" : curBooking.Organisation.Name) + "</td><td style=\"white-space:nowrap;\">" + (curBooking.Provider == null ? "" : curBooking.Provider.Person.FullnameWithoutMiddlename) + "</td><td style=\"white-space:nowrap;\">" + curBooking.DateStart.ToString("dd MMM yyyy") + "</td><td style=\"white-space:nowrap;\">" + "[" + new DateTime(curBooking.RecurringStartTime.Ticks).ToString("HH:mm") + " - " + new DateTime(curBooking.RecurringEndTime.Ticks).ToString("HH:mm") + "]" + "</td></tr>"; // list of all TAKEN times List<Tuple<DateTime, DateTime>> dateRows = new List<Tuple<DateTime, DateTime>>(); // add lunch breaks if (site.LunchStartTime < site.LunchEndTime) AddToDateRows(ref dateRows, startEndTime, curDate.Add(site.LunchStartTime), curDate.Add(site.LunchEndTime)); if (orgLunchTime.Item1 < orgLunchTime.Item2) AddToDateRows(ref dateRows, startEndTime, orgLunchTime.Item1, orgLunchTime.Item2); // add individual bookings/unavailabilities foreach (Booking curBooking in todayBookings) AddToDateRows(ref dateRows, startEndTime, curBooking.DateStart, curBooking.DateEnd); // add recurring bookings/unavailabilities foreach (Booking curBooking in todayRecurring) { if ((curBooking.DateStart != DateTime.MinValue && curDate < curBooking.DateStart.Date) || (curBooking.DateEnd != DateTime.MinValue && curDate > curBooking.DateEnd.Date)) continue; DateTime bkStart = curDate.Add(curBooking.RecurringStartTime); DateTime bkEnd = curDate.Add(curBooking.RecurringEndTime); AddToDateRows(ref dateRows, startEndTime, bkStart, bkEnd); } dateRows = SortAndRemoveOverlaps(dateRows); // list of all AVAILABLE times List<Tuple<DateTime, DateTime>> availableTimeRows = GetAvailableTimes(startEndTime, dateRows); //output1 += "<tr><td colspan=\"7\"><u>Available Times:</u><br />" + PrintList(availableTimeRows) + "</td></tr>"; // remove times when the space available is less than the default minutes set for the offering selected for (int i = availableTimeRows.Count - 1; i >= 0; i--) if (availableTimeRows[i].Item2.Subtract(availableTimeRows[i].Item1).TotalMinutes < selectedOffering.ServiceTimeMinutes) availableTimeRows.RemoveAt(i); //output1 += "<tr><td colspan=\"7\"><u>Available Times:</u><br />" + PrintList(availableTimeRows) + "</td></tr>"; if (availableTimeRows.Count > 0) { string bookingSheetLink = IsLoggedIn() ? "<a href= \"" + Booking.GetLink(curDate, new int[] { orgs[0].OrganisationID }) + "\"><img src=\"/images/Calendar-icon-24px.png\" alt=\"Go To Booking Sheet\" title=\"Go To Booking Sheet\"></a>" : "<a href= \"/Account/CreateNewPatientV2.aspx?id=" + Request.QueryString["id"] + "&from_url=" + Server.UrlEncode(Booking.GetLink(curDate, new int[] { orgs[0].OrganisationID })) + "\"><img src=\"/images/Calendar-icon-24px.png\" alt=\"Go To Booking Sheet\" title=\"Go To Booking Sheet\"></a>"; data[d] = "<td style=\"background:#ffffff !important; border-left:none !important;border-right:none !important;min-width:45px;\"></td><td style=\"background:#ffffff !important; white-space:nowrap;border-left:none !important;border-right:none !important;\"><u>Available Times</u><br />" + PrintList(availableTimeRows, org.OrganisationID, staff.StaffID) + "</td><td style=\"background:#ffffff !important; border-left:none !important;border-right:none !important;min-width:18px;\"></td><td style=\"background:#ffffff !important; border-left:none !important;\">" + bookingSheetLink + "</td>"; } else data[d] = "<td style=\"border-left:none !important;\" colspan=\"4\">Unavailable</td>"; } else { data[d] = "<td style=\"border-left:none !important;\" colspan=\"4\">Unavailable</td>"; } } return data; }
public InvoiceType GetInvoiceType(HealthCard hc, Offering offering, Patient patient, Hashtable patientsMedicareCountCache, Hashtable epcRemainingCache, int MedicareMaxNbrServicesPerYear) { if (this.BookingStatus.ID != 0) throw new CustomMessageException("Booking already set as : " + BookingDB.GetStatusByID(this.BookingStatus.ID).Descr); if (hc != null && hc.Organisation.OrganisationType.OrganisationTypeGroup.ID == 7) return InvoiceType.Insurance; if (hc == null) return InvoiceType.None; if (this.provider.Field.ID == 1) // is GP so referreral/EPC is not relevant { bool isValidMCClaim = hc.Organisation.OrganisationID == -1 && offering.MedicareCompanyCode.Length > 0; bool isValidDVAClaim = hc.Organisation.OrganisationID == -2 && offering.DvaCompanyCode.Length > 0; if (isValidMCClaim || isValidDVAClaim) return (hc.ExpiryDate == DateTime.MinValue || hc.ExpiryDate.Date < DateTime.Today) ? InvoiceType.NoneFromExpired : InvoiceType.Medicare; } else { if (!hc.HasEPC(epcRemainingCache)) return InvoiceType.None; bool within1YearOfCard = this.DateStart.Date >= hc.DateReferralSigned.Date && this.DateStart.Date < hc.DateReferralSigned.Date.AddYears(1); // tested and works! bool offeringHasMedicareClaimNbr = offering.MedicareCompanyCode.Length > 0; bool offeringHasDVAClaimNbr = offering.DvaCompanyCode.Length > 0; if (hc.Organisation.OrganisationID == -1 && offeringHasMedicareClaimNbr) { if (!within1YearOfCard) // in this if block so 'NoneFromExpired' only returned if is medicare/dva card return InvoiceType.NoneFromExpired; int maxNbrMedicareServicesPerYear = MedicareMaxNbrServicesPerYear != -1 ? MedicareMaxNbrServicesPerYear : Convert.ToInt32(SystemVariableDB.GetByDescr("MedicareMaxNbrServicesPerYear").Value); int nbrMedicareServicesSoFarThisYear = patientsMedicareCountCache == null ? (int)InvoiceDB.GetMedicareCountByPatientAndYear(patient.PatientID, this.DateStart.Year) : (int)patientsMedicareCountCache[patient.PatientID]; bool belowYearlyMedicareThreshhold = nbrMedicareServicesSoFarThisYear < maxNbrMedicareServicesPerYear; bool belowMedicareThisServiceThreshhold = true; if (offering.MaxNbrClaimable > 0) { //int nbrMedicareThisServiceSoFarThisPeriod = (int)InvoiceDB.GetMedicareCountByPatientAndYear(patient.PatientID, this.DateStart.Year, offering.OfferingID); int nbrMedicareThisServiceSoFarThisPeriod = (int)InvoiceDB.GetMedicareCountByPatientAndDateRange(patient.PatientID, this.DateStart.Date.AddMonths(-1 * offering.MaxNbrClaimableMonths), this.DateStart.Date, offering.OfferingID); belowMedicareThisServiceThreshhold = nbrMedicareThisServiceSoFarThisPeriod < offering.MaxNbrClaimable; } if (!belowYearlyMedicareThreshhold) return InvoiceType.NoneFromCombinedYearlyThreshholdReached; else if (!belowMedicareThisServiceThreshhold) return InvoiceType.NoneFromOfferingYearlyThreshholdReached; else // if (belowYearlyMedicareThreshhold && belowMedicareThisServiceThreshhold) { HealthCardEPCRemaining[] epcsRemainingForThisType = null; if (epcRemainingCache == null) { epcsRemainingForThisType = HealthCardEPCRemainingDB.GetByHealthCardID(hc.HealthCardID, offering.Field.ID); } else { ArrayList remainingThisField = new ArrayList(); HealthCardEPCRemaining[] allRemainingThisHealthCareCard = (HealthCardEPCRemaining[])epcRemainingCache[hc.HealthCardID]; if (allRemainingThisHealthCareCard != null) for (int i = 0; i < allRemainingThisHealthCareCard.Length; i++) if (allRemainingThisHealthCareCard[i].Field.ID == offering.Field.ID) remainingThisField.Add(allRemainingThisHealthCareCard[i]); epcsRemainingForThisType = (HealthCardEPCRemaining[])remainingThisField.ToArray(typeof(HealthCardEPCRemaining)); } if (epcsRemainingForThisType.Length > 0 && epcsRemainingForThisType[0].NumServicesRemaining == 0) return InvoiceType.NoneFromExpired; if (epcsRemainingForThisType.Length > 0 && epcsRemainingForThisType[0].NumServicesRemaining > 0) return InvoiceType.Medicare; } } if (hc.Organisation.OrganisationID == -2 && offeringHasDVAClaimNbr) { if (!within1YearOfCard) // in this if block so 'NoneFromExpired' only returned if is medicare/dva card return InvoiceType.NoneFromExpired; bool belowMedicareThisServiceThreshhold = true; if (offering.MaxNbrClaimable > 0) { //int nbrMedicareThisServiceSoFarThisPeriod = (int)InvoiceDB.GetMedicareCountByPatientAndYear(patient.PatientID, this.DateStart.Year, offering.OfferingID); int nbrMedicareThisServiceSoFarThisPeriod = (int)InvoiceDB.GetMedicareCountByPatientAndDateRange(patient.PatientID, this.DateStart.Date.AddMonths(-1 * offering.MaxNbrClaimableMonths), this.DateStart.Date, offering.OfferingID); belowMedicareThisServiceThreshhold = nbrMedicareThisServiceSoFarThisPeriod < offering.MaxNbrClaimable; } if (!belowMedicareThisServiceThreshhold) return InvoiceType.NoneFromOfferingYearlyThreshholdReached; else // if (belowMedicareThisServiceThreshhold) return InvoiceType.DVA; } } return InvoiceType.None; }
public static Offering[] RemoveByID(Offering[] inList, int offeringIDToRemove) { System.Collections.ArrayList newList = new System.Collections.ArrayList(); for (int i = 0; i < inList.Length; i++) { if (inList[i].OfferingID != offeringIDToRemove) newList.Add(inList[i]); } return (Offering[])newList.ToArray(typeof(Offering)); }
/// <summary> /// Removes Offering from the collection. /// </summary> /// <param name="offering">The offering to remove.</param> public void Remove(Offering offering) { List.Remove(offering); }
private void EndOfferingDuration() { towerRenderer.material.color = Color.gray; clipMaxSizeModifier -= appliedOffering.clipSizeModifier; clipDelayTimeModifier -= appliedOffering.clipDelayTimeModifier; reloadTimeModifier -= appliedOffering.reloadRateModifier; numberOfTargetsModifier -= appliedOffering.numberOfTargetsModifier; targetRadiusMultiplier -= appliedOffering.targetRadiusMultiplier; targetRadiusArea.radius = targetRadiusBase * (targetRadiusMultiplier +1); appliedOffering = null; }
public void SetOffering(Offering offering) { Debug.Log("Tower get's offering: " + offering.itemName); appliedOffering = offering; StartOfferingDuration(); }
public static DataTable GetDataTable_AllNotInc(Offering[] excList) { string notInList = string.Empty; foreach (Offering o in excList) notInList += o.OfferingID.ToString() + ","; if (notInList.Length > 0) notInList = notInList.Substring(0, notInList.Length - 1); string sql = JoinedSql + " AND o.is_deleted = 0 " + ((notInList.Length > 0) ? " AND o.offering_id NOT IN (" + notInList + @") " : ""); return DBBase.ExecuteQuery(sql).Tables[0]; }