Ejemplo n.º 1
0
        public List <PharmacyFields> getPharmacyFields(string PatientMasterVisitID)
        {
            IPatientPharmacy      patientEncounter = (IPatientPharmacy)ObjectFactory.CreateInstance("BusinessProcess.CCC.BPatientPharmacy, BusinessProcess.CCC");
            List <PharmacyFields> drg = patientEncounter.getPharmacyFields(PatientMasterVisitID);

            return(drg);
        }
Ejemplo n.º 2
0
        public int saveUpdatePharmacy(string PatientMasterVisitID, string PatientId, string LocationID, string OrderedBy,
                                      string UserID, string DispensedBy, string RegimenLine, string ModuleID, string pmscmFlag, string prescription,
                                      string TreatmentProgram, string PeriodTaken, string TreatmentPlan, string TreatmentPlanReason, string Regimen,
                                      string regimenText, string prescriptionDate, string dispensedDate)
        {
            IPatientPharmacy        patientEncounter        = (IPatientPharmacy)ObjectFactory.CreateInstance("BusinessProcess.CCC.BPatientPharmacy, BusinessProcess.CCC");
            PatientEncounterManager patientEncounterManager = new PatientEncounterManager();
            JavaScriptSerializer    parser = new JavaScriptSerializer();
            int val = 0;
            var drugPrescription = parser.Deserialize <List <DrugPrescription> >(prescription);

            string RegimenType = "";

            for (int i = 0; i < drugPrescription.Count; i++)
            {
                if (!RegimenType.ToUpper().Contains(drugPrescription[i].DrugAbbr.ToUpper()))
                {
                    if (drugPrescription[i].DrugAbbr != "")
                    {
                        RegimenType += drugPrescription[i].DrugAbbr + "/";
                    }
                }
            }

            result = patientEncounter.saveUpdatePharmacy(PatientMasterVisitID, PatientId, LocationID, OrderedBy,
                                                         UserID, RegimenType.TrimEnd('/'), DispensedBy, RegimenLine, ModuleID, drugPrescription, pmscmFlag,
                                                         TreatmentProgram, PeriodTaken, TreatmentPlan, TreatmentPlanReason, Regimen, prescriptionDate,
                                                         dispensedDate);

            //--  Raise event if result is>0 for sharing with IL

            if (result > 0)
            {
                MessageEventArgs arg = new MessageEventArgs()
                {
                    PatientId            = Convert.ToInt32(PatientId),
                    EntityId             = result, // the orderId
                    EventOccurred        = "Prescription Raised",
                    MessageType          = MessageType.DrugPrescriptionRaised,
                    FacilityId           = 0,
                    PatientMasterVisitId = Convert.ToInt32(PatientMasterVisitID)
                };
                Publisher.RaiseEventAsync(this, arg).ConfigureAwait(false); // --
            }
            if (result > 0)
            {
                val = patientEncounterManager.AddpatientEncounter(Convert.ToInt32(PatientId), Convert.ToInt32(PatientMasterVisitID), patientEncounterManager.GetPatientEncounterId("EncounterType", "Pharmacy-encounter".ToLower()), 204, Convert.ToInt32(UserID));
            }
            return((val > 0) ? result : 0);
            // return result;
        }
Ejemplo n.º 3
0
        public void getPharmacyDrugFrequency(DropDownList ddl)
        {
            IPatientPharmacy     patientEncounter = (IPatientPharmacy)ObjectFactory.CreateInstance("BusinessProcess.CCC.BPatientPharmacy, BusinessProcess.CCC");
            List <DrugFrequency> drg = patientEncounter.getPharmacyDrugFrequency();

            ddl.Items.Add(new ListItem("Select", "0"));
            if (drg != null && drg.Count > 0)
            {
                foreach (var item in drg)
                {
                    ddl.Items.Add(new ListItem(item.frequency, item.id));
                }
            }
        }
Ejemplo n.º 4
0
        public void getPharmacyTreatmentProgram(DropDownList ddl)
        {
            IPatientPharmacy patientEncounter = (IPatientPharmacy)ObjectFactory.CreateInstance("BusinessProcess.CCC.BPatientPharmacy, BusinessProcess.CCC");
            List <KeyValue>  kv = patientEncounter.getPharmacyTreatmentProgram();

            ddl.Items.Add(new ListItem("Select", "0"));
            if (kv != null && kv.Count > 0)
            {
                foreach (var item in kv)
                {
                    ddl.Items.Add(new ListItem(item.DisplayName, item.ItemId));
                }
            }
        }
Ejemplo n.º 5
0
        public ArrayList getPharmacyTreatmentProgramList()
        {
            IPatientPharmacy patientEncounter = (IPatientPharmacy)ObjectFactory.CreateInstance("BusinessProcess.CCC.BPatientPharmacy, BusinessProcess.CCC");
            List <KeyValue>  kv  = patientEncounter.getPharmacyTreatmentProgram();
            ArrayList        lst = new ArrayList();

            if (kv != null && kv.Count > 0)
            {
                foreach (var item in kv)
                {
                    lst.Add(item.DisplayName);
                }
            }
            return(lst);
        }
Ejemplo n.º 6
0
        public string getPharmacyDrugMultiplier(string frequencyID)
        {
            try
            {
                IPatientPharmacy     patientEncounter = (IPatientPharmacy)ObjectFactory.CreateInstance("BusinessProcess.CCC.BPatientPharmacy, BusinessProcess.CCC");
                List <DrugFrequency> drg = patientEncounter.getPharmacyDrugFrequency();

                List <DrugFrequency> filteredList = drg.Where(x => x.id == frequencyID).ToList();

                return(filteredList[0].multiplier);
            }
            catch
            {
                return("0");
            }
        }
Ejemplo n.º 7
0
        public DataTable getPharmacyPendingPrescriptions(string PatientMasterVisitID, string patientID)
        {
            IPatientPharmacy patientEncounter = (IPatientPharmacy)ObjectFactory.CreateInstance("BusinessProcess.CCC.BPatientPharmacy, BusinessProcess.CCC");

            return(patientEncounter.getPharmacyPendingPrescriptions(PatientMasterVisitID, patientID));
        }
Ejemplo n.º 8
0
        public DataTable getPharmacyRegimens(string regimenLine)
        {
            IPatientPharmacy patientEncounter = (IPatientPharmacy)ObjectFactory.CreateInstance("BusinessProcess.CCC.BPatientPharmacy, BusinessProcess.CCC");

            return(patientEncounter.getPharmacyRegimens(regimenLine));
        }
Ejemplo n.º 9
0
        public DataTable getPharmacyDrugSwitchInterruptionReason(string treatmentPlan)
        {
            IPatientPharmacy patientEncounter = (IPatientPharmacy)ObjectFactory.CreateInstance("BusinessProcess.CCC.BPatientPharmacy, BusinessProcess.CCC");

            return(patientEncounter.getPharmacyDrugSubstitutionInterruptionReason(treatmentPlan));
        }
Ejemplo n.º 10
0
        public List <DrugBatch> getPharmacyDrugBatch(string drugPk)
        {
            IPatientPharmacy patientEncounter = (IPatientPharmacy)ObjectFactory.CreateInstance("BusinessProcess.CCC.BPatientPharmacy, BusinessProcess.CCC");

            return(patientEncounter.getPharmacyDrugBatch(drugPk));
        }
Ejemplo n.º 11
0
        public List <PharmacyFields> getPharmacyCurrentRegimen(string patientId)
        {
            IPatientPharmacy patientEncounter = (IPatientPharmacy)ObjectFactory.CreateInstance("BusinessProcess.CCC.BPatientPharmacy, BusinessProcess.CCC");

            return(patientEncounter.getPharmacyCurrentRegimen(patientId));
        }
Ejemplo n.º 12
0
        public DataTable getPharmacyDrugList(string PMSCM, string treatmentPlan)
        {
            IPatientPharmacy patientEncounter = (IPatientPharmacy)ObjectFactory.CreateInstance("BusinessProcess.CCC.BPatientPharmacy, BusinessProcess.CCC");

            return(patientEncounter.getPharmacyDrugList(PMSCM, treatmentPlan));
        }
Ejemplo n.º 13
0
        public DataTable loadPatientLatestPharmacyPrescription(string PatientID, string FacilityID)
        {
            IPatientPharmacy patientEncounter = (IPatientPharmacy)ObjectFactory.CreateInstance("BusinessProcess.CCC.BPatientPharmacy, BusinessProcess.CCC");

            return(patientEncounter.getLatestPharmacyPrescriptionDetails(PatientID, FacilityID));
        }