Esempio n. 1
0
 private void FormSheetPicker_Load(object sender, EventArgs e)
 {
     listSheets = SheetDefs.GetCustomForType(SheetType);
     if (listSheets.Count == 0 && SheetType == SheetTypeEnum.PatientForm)
     {
         //showingInternalSheetDefs=true;
         listSheets.Add(SheetsInternal.GetSheetDef(SheetInternalType.PatientRegistration));
         listSheets.Add(SheetsInternal.GetSheetDef(SheetInternalType.FinancialAgreement));
         listSheets.Add(SheetsInternal.GetSheetDef(SheetInternalType.HIPAA));
         listSheets.Add(SheetsInternal.GetSheetDef(SheetInternalType.COVID19));
         //Medical History and Consent forms happen below.
     }
     if (SheetType == SheetTypeEnum.PatientForm)           //we will also show medical history, and possibly consent forms
     {
         List <SheetDef> listMedSheets = SheetDefs.GetCustomForType(SheetTypeEnum.MedicalHistory);
         List <SheetDef> listConSheets = SheetDefs.GetCustomForType(SheetTypeEnum.Consent);
         if (listMedSheets.Count == 0)
         {
             //showingInternalMed=true;
             listSheets.Add(SheetsInternal.GetSheetDef(SheetInternalType.MedicalHistSimple));
         }
         else                  //if user has added any of their own medical history forms
         {
             for (int i = 0; i < listMedSheets.Count; i++)
             {
                 listSheets.Add(listMedSheets[i]);
             }
         }
         labelSheetType.Text = Lan.g(this, "Patient Forms and Medical Histories"); //Change name?
         if (PrefC.GetBool(PrefName.PatientFormsShowConsent))                      //only if they want to see consent forms with patient forms.
         {
             if (listConSheets.Count == 0)                                         //use internal consent forms
             {
                 listSheets.Add(SheetsInternal.GetSheetDef(SheetInternalType.Consent));
             }
             else                      //if user has added any of their own consent forms
             {
                 for (int i = 0; i < listConSheets.Count; i++)
                 {
                     listSheets.Add(listConSheets[i]);
                 }
             }
             labelSheetType.Text = Lan.g(this, "Patient, Consent, and Medical History Forms");
         }
     }
     else
     {
         labelSheetType.Text   = Lan.g("enumSheetTypeEnum", SheetType.ToString());
         butTerminal.Visible   = false;
         labelTerminal.Visible = false;
     }
     if (HideKioskButton)
     {
         butTerminal.Visible   = false;
         labelTerminal.Visible = false;
     }
     for (int i = 0; i < listSheets.Count; i++)
     {
         listMain.Items.Add(listSheets[i].Description);
     }
 }
Esempio n. 2
0
        public static long GetDefaultSheetDefNum(SheetTypeEnum sheetType)
        {
            long retVal = 0;

            switch (sheetType)
            {
            case SheetTypeEnum.Consent:
                retVal = GetLong(PrefName.SheetsDefaultConsent);
                break;

            case SheetTypeEnum.DepositSlip:
                retVal = GetLong(PrefName.SheetsDefaultDepositSlip);
                break;

            case SheetTypeEnum.ExamSheet:
                retVal = GetLong(PrefName.SheetsDefaultExamSheet);
                break;

            case SheetTypeEnum.LabelAppointment:
                retVal = GetLong(PrefName.SheetsDefaultLabelAppointment);
                break;

            case SheetTypeEnum.LabelCarrier:
                retVal = GetLong(PrefName.SheetsDefaultLabelCarrier);
                break;

            case SheetTypeEnum.LabelPatient:
                retVal = GetLong(PrefName.SheetsDefaultLabelPatient);
                break;

            case SheetTypeEnum.LabelReferral:
                retVal = GetLong(PrefName.SheetsDefaultLabelReferral);
                break;

            case SheetTypeEnum.LabSlip:
                retVal = GetLong(PrefName.SheetsDefaultLabSlip);
                break;

            case SheetTypeEnum.MedicalHistory:
                retVal = GetLong(PrefName.SheetsDefaultMedicalHistory);
                break;

            case SheetTypeEnum.MedLabResults:
                retVal = GetLong(PrefName.SheetsDefaultMedLabResults);
                break;

            case SheetTypeEnum.PatientForm:
                retVal = GetLong(PrefName.SheetsDefaultPatientForm);
                break;

            case SheetTypeEnum.PatientLetter:
                retVal = GetLong(PrefName.SheetsDefaultPatientLetter);
                break;

            case SheetTypeEnum.PaymentPlan:
                retVal = GetLong(PrefName.SheetsDefaultPaymentPlan);
                break;

            case SheetTypeEnum.ReferralLetter:
                retVal = GetLong(PrefName.SheetsDefaultReferralLetter);
                break;

            case SheetTypeEnum.ReferralSlip:
                retVal = GetLong(PrefName.SheetsDefaultReferralSlip);
                break;

            case SheetTypeEnum.RoutingSlip:
                retVal = GetLong(PrefName.SheetsDefaultRoutingSlip);
                break;

            case SheetTypeEnum.Rx:
                retVal = GetLong(PrefName.SheetsDefaultRx);
                break;

            case SheetTypeEnum.RxMulti:
                retVal = GetLong(PrefName.SheetsDefaultRxMulti);
                break;

            case SheetTypeEnum.Screening:
                retVal = GetLong(PrefName.SheetsDefaultScreening);
                break;

            case SheetTypeEnum.Statement:
                retVal = GetLong(PrefName.SheetsDefaultStatement);
                break;

            case SheetTypeEnum.TreatmentPlan:
                retVal = GetLong(PrefName.SheetsDefaultTreatmentPlan);
                break;

            default:
                throw new Exception(Lans.g("SheetDefs", "Unsupported SheetTypeEnum") + "\r\n" + sheetType.ToString());
            }
            return(retVal);
        }
Esempio n. 3
0
        ///<summary>Throws Exception.
        ///Gets the practice wide default PrefName that corresponds to the passed in sheet type.  The PrefName must follow the pattern "SheetsDefault"+PrefName.</summary>
        public static PrefName GetSheetDefPref(SheetTypeEnum sheetType)
        {
            PrefName retVal = PrefName.SheetsDefaultConsent;

            //The following SheetTypeEnums will always fail this Enum.TryParse(...)
            //ERA, ERAGridHeader, PatientDashboard, PatientDashboardWidget
            //These SheetTypeEnums do not save to the DB when created and do not have a corresponding 'practice wide default'.
            //The mentioned SheetTypeEnums really shouldn't call this function.
            if (!Enum.TryParse("SheetsDefault" + sheetType.GetDescription(), out retVal))
            {
                throw new Exception(Lans.g("SheetDefs", "Unsupported SheetTypeEnum") + "\r\n" + sheetType.ToString());
            }
            return(retVal);
        }
Esempio n. 4
0
		///<summary>Gets the practice wide default PrefName that corresponds to the passed in sheet type.</summary>
		public static PrefName GetSheetDefPref(SheetTypeEnum sheetType) {
			PrefName retVal=PrefName.SheetsDefaultConsent;
			switch(sheetType) {
				case SheetTypeEnum.Consent:
					retVal=PrefName.SheetsDefaultConsent;
					break;
				case SheetTypeEnum.DepositSlip:
					retVal=PrefName.SheetsDefaultDepositSlip;
					break;
				case SheetTypeEnum.ExamSheet:
					retVal=PrefName.SheetsDefaultExamSheet;
					break;
				case SheetTypeEnum.LabelAppointment:
					retVal=PrefName.SheetsDefaultLabelAppointment;
					break;
				case SheetTypeEnum.LabelCarrier:
					retVal=PrefName.SheetsDefaultLabelCarrier;
					break;
				case SheetTypeEnum.LabelPatient:
					retVal=PrefName.SheetsDefaultLabelPatient;
					break;
				case SheetTypeEnum.LabelReferral:
					retVal=PrefName.SheetsDefaultLabelReferral;
					break;
				case SheetTypeEnum.LabSlip:
					retVal=PrefName.SheetsDefaultLabSlip;
					break;
				case SheetTypeEnum.MedicalHistory:
					retVal=PrefName.SheetsDefaultMedicalHistory;
					break;
				case SheetTypeEnum.MedLabResults:
					retVal=PrefName.SheetsDefaultMedLabResults;
					break;
				case SheetTypeEnum.PatientForm:
					retVal=PrefName.SheetsDefaultPatientForm;
					break;
				case SheetTypeEnum.PatientLetter:
					retVal=PrefName.SheetsDefaultPatientLetter;
					break;
				case SheetTypeEnum.PaymentPlan:
					retVal=PrefName.SheetsDefaultPaymentPlan;
					break;
				case SheetTypeEnum.ReferralLetter:
					retVal=PrefName.SheetsDefaultReferralLetter;
					break;
				case SheetTypeEnum.ReferralSlip:
					retVal=PrefName.SheetsDefaultReferralSlip;
					break;
				case SheetTypeEnum.RoutingSlip:
					retVal=PrefName.SheetsDefaultRoutingSlip;
					break;
				case SheetTypeEnum.Rx:
					retVal=PrefName.SheetsDefaultRx;
					break;
				case SheetTypeEnum.RxMulti:
					retVal=PrefName.SheetsDefaultRxMulti;
					break;
				case SheetTypeEnum.Screening:
					retVal=PrefName.SheetsDefaultScreening;
					break;
				case SheetTypeEnum.Statement:
					retVal=PrefName.SheetsDefaultStatement;
					break;
				case SheetTypeEnum.TreatmentPlan:
					retVal=PrefName.SheetsDefaultTreatmentPlan;
					break;
				default:
					throw new Exception(Lans.g("SheetDefs","Unsupported SheetTypeEnum")+"\r\n"+sheetType.ToString());
			}
			return retVal;
		}