public IssuedMedicine(IDbDataService service, DdtHospital hospitalitySession, string issuedMedId) { this.service = service; this.hospitalitySession = hospitalitySession; this.issuedMedId = issuedMedId; InitializeComponent(); ControlUtils.InitDoctorsByGroupName(service.GetDdvDoctorService(), clinicalPharmacologistBox, "clinical_pharmacologists"); ControlUtils.InitDoctorsByGroupName(service.GetDdvDoctorService(), nurseBox, "nurses"); ControlUtils.InitDoctorsByGroupName(service.GetDdvDoctorService(), cardioReanimBox, "cardioreanimation_department"); ControlUtils.InitDoctorsByGroupNameAndOrder(service.GetDdvDoctorService(), directorBox, "cardioreanimation_department", "default.cardioreanimation_department_head"); InitIssuedCure(); DdvPatient patient = service.GetDdvPatientService().GetById(hospitalitySession.Patient); if (patient != null) { Text += " " + patient.ShortName; if (patient.Sd && (diagnosisTxt.Text == null || !diagnosisTxt.Text.Contains("СД"))) { diagnosisTxt.Text += "СД "; } } }
public static void fillBlankTemplate(IDbDataService service, string templateFileName, string hospitalSessionId, Dictionary <string, string> values) { DdtHospital hospitalSession = service.GetDdtHospitalService().GetById(hospitalSessionId); DdvPatient patient = null; if (hospitalSession != null) { DdvDoctor doc = service.GetDdvDoctorService().GetById(hospitalSession.CuringDoctor); patient = service.GetDdvPatientService().GetById(hospitalSession.Patient); values.Add(@"{doctor.who.short}", doc.ShortName); values.Add(@"{patient.initials}", patient.ShortName); values.Add(@"{patient.birthdate}", patient.Birthdate.ToShortDateString()); values.Add(@"{patient.diagnosis}", hospitalSession.Diagnosis); values.Add(@"{patient.age}", DateTime.Now.Year - patient.Birthdate.Year + ""); values.Add(@"{admission.date}", hospitalSession.AdmissionDate.ToShortDateString()); values.Add(@"{patient.historycard}", patient.MedCode); values.Add(@"{doctor.who}", doc.FullName); values.Add(@"{patient.fullname}", patient.FullName); values.Add(@"{date}", DateTime.Now.ToShortDateString()); IList <DdvDoctor> allGroupsDoc = service.GetDdvDoctorService().GetByGroupName("cardioreanimation_department_head"); doc = allGroupsDoc.Count > 0 ? allGroupsDoc[0] : null; values.Add(@"{doctor.io.department}", doc?.ShortName); allGroupsDoc.Clear(); allGroupsDoc = service.GetDdvDoctorService().GetByGroupName("therapy_deputy_head"); doc = allGroupsDoc.Count > 0 ? allGroupsDoc[0] : null; values.Add(@"{doctor.io.hospital}", doc?.ShortName); } string resultName = getTempFileName("Бланк", patient?.FullName); TemplatesUtils.FillTemplateAndShow(Directory.GetCurrentDirectory() + "\\Templates\\" + templateFileName, values, resultName); }
public AmbulanceLetters(IDbDataService service, DdtHospital hospitalitySession) { this.service = service; this.hospitalitySession = hospitalitySession; InitializeComponent(); ControlUtils.InitDoctorsByGroupNameAndOrder(service.GetDdvDoctorService(), doctorsBox, "cardioreanimation_department", "default.cardioreanimation_department_head"); }
private void PutBloodData(Dictionary <string, string> values, IDbDataService service, string objId) { IList <DdtBloodAnalysis> bloods = service.GetDdtBloodAnalysisService().GetByParentId(objId); StringBuilder bloodStr = new StringBuilder(); foreach (DdtBloodAnalysis blood in bloods) { bloodStr.Append(" от ").Append(blood.AnalysisDate.ToShortDateString()).Append(": "); bloodStr.Append(CompileValue("АЛТ", blood.Alt)); bloodStr.Append(CompileValue("Креатинин", blood.Creatinine)); bloodStr.Append(CompileValue("АСТ", blood.Ast)); bloodStr.Append(CompileValue("Холестерин", blood.Cholesterol)); bloodStr.Append(CompileValue("Гемоглобин", blood.Hemoglobin)); bloodStr.Append(CompileValue("Лейкоциты", blood.Leucocytes)); bloodStr.Append(CompileValue("Амилаза", blood.Amylase)); bloodStr.Append(CompileValue("Бил. Общ.", blood.Bil)); bloodStr.Append(CompileValue("Хлор", blood.Chlorine)); bloodStr.Append(CompileValue("Железо", blood.Iron)); bloodStr.Append(CompileValue("КФК", blood.Kfk)); bloodStr.Append(CompileValue("КФК-МВ", blood.KfkMv)); bloodStr.Append(CompileValue("Тромбоциты", blood.Platelets)); bloodStr.Append(CompileValue("Калий", blood.Potassium)); bloodStr.Append(CompileValue("Белок", blood.Protein)); bloodStr.Append(CompileValue("ЩФ", blood.Schf)); bloodStr.Append(CompileValue("Натрий", blood.Sodium)); bloodStr.Append(CompileValue("СРБ", blood.Srp)); bloodStr.Append(". "); } values.Add("{on_blood}", bloods.Count > 0 ? "Анализы крови " : ""); values.Add("{blood}", bloodStr.ToString() + (bloods.Count > 0 ? "\n" : "")); }
private string GetMembersInString(IDbDataService service, string consiliumId) { IList <DdtConsiliumRelation> consiluimRelations = service.GetDdtConsiliumRelationService().GetConsiliumRelationsByConsiliumId(consiliumId); Dictionary <int, String> memberToOrder = new Dictionary <int, String>(); SortedDictionary <String, String> sortedMembers = new SortedDictionary <String, String>(); foreach (DdtConsiliumRelation relation in consiluimRelations) { DdtConsiliumGroupMember groupMember = service.GetDdtConsiliumGroupMemberService().GetById(relation.Member); DdtConsiliumGroup group = service.GetDdtConsiliumGroupService().GetById(groupMember.Group); DdvDoctor doctor = service.GetDdvDoctorService().GetById(groupMember.Doctor); if (!sortedMembers.ContainsKey(group.Level + " " + group.Name + " " + doctor.ShortName)) { sortedMembers.Add(group.Level + " " + group.Name + " " + doctor.ShortName, group.Name + " " + groupMember.Name + " " + doctor.ShortName); } } StringBuilder str = new StringBuilder(); foreach (KeyValuePair <String, String> kvp in sortedMembers) { if (str.Length > 0) { str.Append('\n'); } str.Append(kvp.Value); } return(str.ToString()); }
private void InitDefaultMembers(IDbDataService service, IList <DdtConsiliumGroupMember> defaultGroupMembers) { for (int i = 0; i < defaultGroupMembers.Count; i++) { if (doctorsContainer.Controls.Count <= i) { doctorsContainer.Controls.Add(CommonUtils.CopyControl(dotorInfoPnl0, doctorsContainer.Controls.Count)); } ComboBox cbApp = (ComboBox)CommonUtils.FindControl(doctorsContainer, "appointmentTxt" + i); cbApp.SelectedIndexChanged += new System.EventHandler(this.appointmentTxt0_SelectedIndexChanged); ControlUtils.InitConsiliumGroupsComboboxValues(service.GetDdtConsiliumGroupService(), cbApp); DdtConsiliumGroup group = service.GetDdtConsiliumGroupService().GetById(defaultGroupMembers[i].Group); if (group != null) { cbApp.SelectedIndex = cbApp.FindStringExact(group.Name); ComboBox cbDoctor = (ComboBox)CommonUtils.FindControl(doctorsContainer, "doctorWho" + i); ControlUtils.InitDoctorsByConsiliumGroupId(service.GetDdvDoctorService(), cbDoctor, group.ObjectId); cbDoctor.SelectedValue = defaultGroupMembers[i].Doctor; } //Control c = CommonUtils.FindControl(doctorsContainer, "objectIdLbl" + i); //c.Text = defaultMembers[i].ObjectId; Button b = (Button)CommonUtils.FindControl(doctorsContainer, "removeBtn" + i); b.Visible = true; b.Click += new System.EventHandler(this.removeBtn0_Click); } }
public AlcoIntoxication(IDbDataService service, DdtHospital hospitalitySession) { this.service = service; this.hospitalitySession = hospitalitySession; InitializeComponent(); initProtocol(); }
public void Show(int x, int y, Control parent, string attrName, OnCompleteListener listener) { this.service = DbDataService.GetInstance(); this.attrName = attrName; this.listener = listener; Show(parent, x, y); }
internal static void InitDoctorsByGroupComboboxValues(IDbDataService service, ComboBox cb, string groupName) { string query = @"SELECT d.r_object_id, d.dss_full_name, d.dss_middle_name, d.dss_first_name, d.r_modify_date, d.dss_short_name, d.r_creation_date, d.dss_last_name FROM ddv_doctor d, dm_group_users gr WHERE gr.dss_group_name='" + groupName + "' AND gr.dsid_doctor_id=d.r_object_id"; cb.DataSource = service.GetDdvDoctorService().GetByQuery(query); cb.ValueMember = "ObjectId"; cb.DisplayMember = "ShortName"; }
internal static void SetDoctorsComboboxDefaultValue(IDbDataService service, ComboBox cb, string dsidCuringDoctor) { if (!string.IsNullOrEmpty(dsidCuringDoctor)) { DdvDoctor doctor = service.GetDdvDoctorService().GetById(dsidCuringDoctor); cb.SelectedIndex = cb.FindStringExact(doctor.ShortName); } }
public Shell(IComponentContext container, IDbDataService dbDataservice, ILoggingService logger) { _container = container; _dataService = dbDataservice; _logger = logger; _logger.SetName("$safeprojectname$"); }
public PreoperativeEpicrisiscs(IDbDataService service, DdtHospital hospitalitySession, string objectId) { this.hospitalitySession = hospitalitySession; this.objectId = objectId; this.service = service; InitializeComponent(); InitControls(); }
public AuthMiddleware(OwinMiddleware next, ILoggingService logger, IDbDataService dbData) : base(next) { _logger = logger; _dbData = dbData; _logger.SetName("$safeprojectname$"); }
public Serology(IDbDataService service, DdtHospital hospitalitySession) { this.service = service; this.hospitalitySession = hospitalitySession; serology = service.GetDdtSerologyService().GetByHospitalSession(hospitalitySession.ObjectId); InitializeComponent(); InitBoxes(); }
internal static void InitDoctorsComboboxValues(IDbDataService service, ComboBox cb, string whereCnd) { cb.Items.Clear(); string query = @"SELECT r_object_id, dss_full_name, dss_middle_name, dss_first_name, r_modify_date, dss_short_name, r_creation_date, dss_last_name FROM ddv_doctor " + (string.IsNullOrEmpty(whereCnd) ? "" : (" WHERE " + whereCnd)); IList <DdvDoctor> doctors = service.GetDdvDoctorService().GetByQuery(query); cb.DataSource = doctors; cb.ValueMember = "ObjectId"; cb.DisplayMember = "ShortName"; }
internal static void InitCureComboboxValuesByTypeId(IDbDataService service, ComboBox cb, string cureTypeId) { cb.SelectedIndex = -1; cb.Items.Clear(); IList <DdtCure> cureList = service.GetDdtCureService().GetListByCureTypeId(cureTypeId); cb.Items.AddRange(cureList.ToArray()); cb.ValueMember = "ObjectId"; cb.DisplayMember = "Name"; }
internal DdtIssuedAction getObject(IDbDataService service) { if (!string.IsNullOrEmpty(issuedActionTxt.Text)) { DdtIssuedAction result = service.GetDdtIssuedActionService().GetById(objectId) ?? new DdtIssuedAction(); result.Action = issuedActionTxt.Text; return(result); } return(null); }
public XRayControl(string objectId, IAnalysisContainer container, bool additional) { this.service = DbDataService.GetInstance(); this.objectId = objectId; this.isEditable = !additional; this.container = container; InitializeComponent(); initControls(); hasChanges = false; isNew = string.IsNullOrEmpty(objectId); }
public PatientList(IDbDataService service, bool admin) { this.service = service; this.admin = admin; System.Windows.Forms.Control.CheckForIllegalCrossThreadCalls = false; InitializeComponent(); this.hospitalPatientsTbl.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing; adminToolStripMenuItem.Visible = admin; }
private void PutHolterData(Dictionary <string, string> values, IDbDataService service, string objId) { IList <DdtHolter> lholterobj = service.GetDdtHolterService().GetByParentId(objId); StringBuilder holterBld = new StringBuilder(); foreach (DdtHolter obj in lholterobj) { holterBld.Append(" от ").Append(obj.AnalysisDate.ToShortDateString()).Append(": ").Append(obj.Holter).Append("."); } values.Add("{on_holter}", lholterobj.Count > 0 ? "Холтер:" : ""); values.Add("{holter}", holterBld.ToString() + (lholterobj.Count > 0 ? "\n" : "")); }
private void PutEkgData(Dictionary <string, string> values, IDbDataService service, string objId) { IList <DdtEkg> ekg = service.GetDdtEkgService().GetByParentId(objId); StringBuilder ekgBld = new StringBuilder(); foreach (DdtEkg ekk in ekg) { ekgBld.Append(" от ").Append(ekk.AnalysisDate.ToShortDateString()).Append(": ").Append(ekk.Ekg).Append("."); } values.Add("{on_ekg}", ekg.Count > 0 ? "ЭКГ:" : ""); values.Add("{ekg}", ekgBld.ToString() + (ekg.Count > 0 ? "\n" : "")); }
internal static void InitCureTypeComboboxValues(IDbDataService service, ComboBox cb) { cb.Items.Clear(); IList <DdtCureType> cureList = service.GetDdtCureTypeService().GetAll(); foreach (DdtCureType obj in cureList) { cb.Items.Add(obj); } cb.ValueMember = "ObjectId"; cb.DisplayMember = "Name"; }
public PatientAdmission(IDbDataService service, DdtHospital hospital) { this.service = service; this.hospital = hospital; InitializeComponent(); System.Drawing.Size halfScreenSize = new System.Drawing.Size(SystemInformation.PrimaryMonitorSize.Width / 2, SystemInformation.PrimaryMonitorSize.Height); this.patientBaseInfoBox.MaximumSize = halfScreenSize; this.lordOfTheCotBox.MaximumSize = halfScreenSize; InitDutyDoctors(); InitControls(); }
internal void PutAnalysisData(Dictionary <string, string> values, IDbDataService service, string parentId) { PutBloodData(values, service, parentId); PutEkgData(values, service, parentId); PutSpecialistData(values, service, parentId); PutKagData(values, service, parentId); PutHolterData(values, service, parentId); PutUziData(values, service, parentId); PutCoagulogrammData(values, service, parentId); PutEgdsData(values, service, parentId); PutUrineData(values, service, parentId); PutXRayData(values, service, parentId); }
public PatientsHistory(IDbDataService service, DdtHospital hospitalitySession) { this.service = service; this.hospitalitySession = hospitalitySession; InitializeComponent(); this.patientHistoryGrid.ColumnHeadersHeightSizeMode = DataGridViewColumnHeadersHeightSizeMode.DisableResizing; DdvPatient patient = service.GetDdvPatientService().GetById(hospitalitySession.Patient); if (patient != null) { Text += " " + patient.ShortName; } }
public Inspection(IDbDataService service, DdtHospital hospitalitySession, string id) { this.service = service; this.hospitalitySession = hospitalitySession; SilentSaver.setForm(this); InitializeComponent(); initControls(id); List <string> validTypes = new List <string>() { "ddt_blood_analysis", "ddt_ekg", "ddt_urine_analysis", "ddt_egds", "ddt_xray", "ddt_holter", "ddt_specialist_conclusion", "ddt_uzi" }; analysisTabControl1.init(hospitalitySession, inspectionObj?.ObjectId, DdtInspection.NAME, validTypes); }
private void PutEgdsData(Dictionary <string, string> values, IDbDataService service, string objId) { IList <DdtEgds> egdss = service.GetDdtEgdsService().GetByParentId(objId); StringBuilder egdsBld = new StringBuilder(); foreach (DdtEgds egds in egdss) { egdsBld.Append(" от ").Append(egds.AnalysisDate.ToShortDateString()).Append(": "); egdsBld.Append(CompileValue("", egds.Egds)); egdsBld.Append(". "); } values.Add("{on_egds}", egdss.Count > 0 ? "На ЭГДС:" : ""); values.Add("{egds}", egdsBld.ToString() + (egdss.Count > 0 ? "\n" : "")); }
private void initCardioConslusions(IDbDataService service) { IList <DdtJournal> cardioConclusions = service.GetDdtJournalService().GetByJournalDayId(journalDayId); for (int i = 0; i < cardioConclusions.Count; i++) { if (dutyCardioContainer.Controls.Count <= i) { JournalKAGControl control = new JournalKAGControl(this, cardioConclusions[i].ObjectId, false); //control.Anchor = AnchorStyles.Right; dutyCardioContainer.Controls.Add(control); } } }
public Consilium(IDbDataService service, DdtHospital hospitalitySession, string consiliumId) { this.service = service; this.hospitalitySession = hospitalitySession; this.consiliumId = consiliumId; InitializeComponent(); InitControls(); List <string> validTypes = new List <string>() { "ddt_blood_analysis", "ddt_kag", "ddt_ekg", "ddt_urine_analysis", "ddt_egds", "ddt_xray", "ddt_holter", "ddt_specialist_conclusion", "ddt_uzi" }; analysisTabControl1.init(hospitalitySession, consiliumId, DdtConsilium.NAME, validTypes); SilentSaver.setForm(this); }
internal static DdtJournal ResolveKagJournal(IDbDataService service, DateTime incpectionDate, string sessionId) { string startDateQuery = @"SELECT dsdt_inspection_date FROM " + DdtInspection.NAME + " WHERE dsid_hospitality_session='" + sessionId + "'" + " AND dsdt_inspection_date<to_timestamp('" + incpectionDate.ToShortDateString() + " " + incpectionDate.ToLongTimeString() + "', 'DD.MM.YYYY HH24:MI:SS') ORDER BY dsdt_inspection_date DESC"; DateTime startDate = service.GetTime(startDateQuery); return(service.GetDdtJournalService().GetObject(@"SELECT jrn.r_object_id, jrn.dss_diagnosis, jrn.dss_chss, jrn.dss_chdd, jrn.r_creation_date, jrn.dss_complaints, jrn.dss_surgeon_exam, jrn.dss_ekg, jrn.dsdt_admission_date, jrn.dss_monitor, jrn.dss_rhythm, jrn.dsid_journal_day, jrn.dss_ps, jrn.dss_ad, jrn.r_modify_date, jrn.dss_cardio_exam, jrn.dsi_journal_type, jrn.dsb_good_rhythm, jrn.dsb_release_journal, jrn.dss_journal, jrn.dsid_doctor, jrn.dsb_freeze, jrn.dsd_weight FROM ddt_journal jrn, ddt_journal_day jd " + " WHERE jd.r_object_id=jrn.dsid_journal_day AND jd.dsid_hospitality_session='" + sessionId + "'" + " AND jd.dsi_journal_type=" + (int)DdtJournalDsiType.AfterKag + (startDate != default(DateTime) ? (" AND jrn.dsdt_admission_date>=to_timestamp('" + startDate.ToShortDateString() + " " + startDate.ToLongTimeString() + "', 'dd.mm.yyyy HH24:mi:ss')") : "") + " AND jrn.dsdt_admission_date<=to_timestamp('" + incpectionDate.ToShortDateString() + " " + incpectionDate.ToLongTimeString() + "', 'dd.mm.yyyy HH24:mi:ss')")); }