public AmbulanceLetters(IDbDataService service, DdtHospital hospitalitySession) { this.service = service; this.hospitalitySession = hospitalitySession; InitializeComponent(); ControlUtils.InitDoctorsByGroupNameAndOrder(service.GetDdvDoctorService(), doctorsBox, "cardioreanimation_department", "default.cardioreanimation_department_head"); }
public AlcoIntoxication(IDbDataService service, DdtHospital hospitalitySession) { this.service = service; this.hospitalitySession = hospitalitySession; InitializeComponent(); initProtocol(); }
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 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 void refreshObject(object obj) { if (obj != null && obj is DdtKag) { DdtKag kag = (DdtKag)obj; kagResultsTxt.Text = kag.Results; kagManipulationTxt.Text = kag.KagManipulation; kagActionsTxt.Text = kag.KagAction; DateTime startTime = kag.StartTime == default(DateTime) ? DateTime.Now : kag.StartTime; kagDate.Value = startTime; kagStartTime.Value = startTime; kagEndTime.Value = kag.EndTime == default(DateTime) ? startTime.AddHours(1) : kag.EndTime; title.Text = "Анализы за " + kag.AnalysisDate.ToShortDateString(); objectId = kag.ObjectId; isNew = string.IsNullOrEmpty(objectId); hasChanges = false; } else { DdtHospital hospitalitySession = DbDataService.GetInstance().GetDdtHospitalService().GetById(hospitalSessionId); DateTime admissionDate = hospitalitySession.AdmissionDate; kagDate.Value = admissionDate; kagStartTime.Value = admissionDate.AddMinutes(30); kagEndTime.Value = kagStartTime.Value.AddHours(1); } }
private void initTitle() { if (DdtBloodAnalysis.NAME.Equals(typeName, StringComparison.Ordinal)) { this.Text = "Клинический анализ крови"; } else if (DdtUrineAnalysis.NAME.Equals(typeName, StringComparison.Ordinal)) { this.Text = "Анализ мочи"; } else if (DdtKag.NAME.Equals(typeName, StringComparison.Ordinal)) { this.Text = "КАГ"; } else if (DdtEkg.NAME.Equals(typeName, StringComparison.Ordinal)) { this.Text = "ЭКГ"; } else if (DdtEgds.NAME.Equals(typeName, StringComparison.Ordinal)) { this.Text = "ЭГДС"; } else if (DdtUzi.NAME.Equals(typeName, StringComparison.Ordinal)) { this.Text = "УЗИ"; } else if (DdtXRay.NAME.Equals(typeName, StringComparison.Ordinal)) { this.Text = "Рентген/КТ"; } else if (DdtHolter.NAME.Equals(typeName, StringComparison.Ordinal)) { this.Text = "Холтер/СМАД"; } else if (DdtSpecialistConclusion.NAME.Equals(typeName, StringComparison.Ordinal)) { this.Text = "Заключение специалистов"; } else if (DdtCoagulogram.NAME.Equals(typeName, StringComparison.Ordinal)) { this.Text = "Коагулограмма"; } else if (DdtHormones.NAME.Equals(typeName, StringComparison.Ordinal)) { this.Text = "Гормоны"; } else if (DdtHormones.NAME.Equals(typeName, StringComparison.Ordinal)) { this.Text = "Онкомаркеры"; } DdtHospital hospital = service.GetDdtHospitalService().GetById(hospitalitySession.ObjectId); DdvPatient patient = service.GetDdvPatientService().GetById(hospital.Patient); if (patient != null) { this.Text += " " + patient.ShortName; } }
public PreoperativeEpicrisiscs(IDbDataService service, DdtHospital hospitalitySession, string objectId) { this.hospitalitySession = hospitalitySession; this.objectId = objectId; this.service = service; InitializeComponent(); InitControls(); }
public Serology(IDbDataService service, DdtHospital hospitalitySession) { this.service = service; this.hospitalitySession = hospitalitySession; serology = service.GetDdtSerologyService().GetByHospitalSession(hospitalitySession.ObjectId); InitializeComponent(); InitBoxes(); }
private void cancelBtn_Click(object sender, EventArgs e) { combainingContainer.Controls.Clear(); selectedIds.Clear(); currentId = null; hospitalitySession = null; typeName = null; Close(); }
public Serology(DdtHospital hospitalitySession) { this.hospitalitySession = hospitalitySession; DataService service = new DataService(); serology = service.queryObject <DdtSerology>(@"select * from ddt_serology where dsid_hospitality_session='" + hospitalitySession.ObjectId + "'"); InitializeComponent(); initBoxes(); }
public Death(DdtHospital hospitalSession, DdvPatient patient) { this.hospitalSession = hospitalSession; this.patient = patient; InitializeComponent(); IDdvDoctorService service = DbDataService.GetInstance().GetDdvDoctorService(); ControlUtils.InitDoctorsByGroupName(service, doctorsBox, "cardioreanimation_department"); doctorsBox.SelectedValue = hospitalSession.CuringDoctor; }
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(); }
private void printBtn_Click(object sender, EventArgs e) { SaveIssuedMedicine(); Dictionary <string, string> values = new Dictionary <string, string>(); DdtIssuedMedicineList medList = service.GetDdtIssuedMedicineListService().GetById(issuedMedId); DdtHospital hospitalSession = service.GetDdtHospitalService().GetById(hospitalitySession.ObjectId); DdvDoctor doc = null; DdvDoctor nurse = null; DdvDoctor director = null; DdvDoctor pharma = null; DdvPatient patient = null; if (medList != null) { doc = service.GetDdvDoctorService().GetById(medList.Doctor); nurse = service.GetDdvDoctorService().GetById(medList.Nurse); director = service.GetDdvDoctorService().GetById(medList.Director); pharma = service.GetDdvDoctorService().GetById(medList.Pharmacologist); patient = service.GetDdvPatientService().GetById(medList.Patient); } values.Add(@"{doctor.who.short}", doc?.ShortName); values.Add(@"{patient.diagnosis}", diagnosisTxt.Text); values.Add(@"{patient.age}", patient != null? DateTime.Now.Year - patient.Birthdate.Year + "": ""); values.Add(@"{admission.date}", hospitalSession.AdmissionDate.ToShortDateString()); values.Add(@"{patient.historycard}", patient?.MedCode); values.Add(@"{patient.fullname}", patient?.FullName); values.Add(@"{kag}", kagBtn.Checked ? shortlyOperationTxt.Text : ""); values.Add(@"{nurse}", nurse?.ShortName); values.Add(@"{doctor.pharma}", pharma?.ShortName); values.Add(@"{doctor.director}", director?.ShortName); values.Add(@"{room}", hospitalitySession.RoomCell); values.Add(@"{cell}", ""); values.Add(@"{diet}", "НКД"); values.Add(@"{date}", DateTime.Now.ToShortDateString()); //todo переписать,когда будет время. Сделать добавление в таблицу строчек автоматом for (int i = 0; i < 19; i++) { string value = ""; if (i < medicineList.Count) { DdtCure cure = service.GetDdtCureService().GetById(medicineList[i].Cure); value = cure.Name; } values.Add(@"{issued_medicine_" + i + "}", value); } string templatePath = Directory.GetCurrentDirectory() + "\\Templates\\issued_medicine_template.doc"; TemplatesUtils.FillTemplateAndShow(templatePath, values, TemplatesUtils.getTempFileName("Назначения", patient.FullName)); }
public void saveObject(DdtHospital hospitalitySession, string parentId, string parentType) { if (isEditable && (isNew && getIsValid() || isDirty())) { DdtHormones hormones = (DdtHormones)getObject(); hormones.HospitalitySession = hospitalitySession.ObjectId; hormones.Doctor = hospitalitySession.CuringDoctor; hormones.Patient = hospitalitySession.Patient; objectId = DbDataService.GetInstance().GetDdtHormonesService().Save(hormones); isNew = false; hasChanges = false; } }
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; } }
private void hospitalPatientsTbl_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { IEnumerator it = hospitalPatientsTbl.SelectedRows.GetEnumerator(); if (it.MoveNext()) { DataGridViewRow row = (DataGridViewRow)it.Current; DataGridViewCell cell = row.Cells[0]; DdtHospital hospitalSession = service.GetDdtHospitalService().GetById(cell.Value.ToString()); PatientAdmission admissionPatient = new PatientAdmission(this.service, hospitalSession); admissionPatient.ShowDialog(); } }
public void saveObject(DdtHospital hospitalitySession, string parentId, string parentType) { if (isEditable && (isDirty() || isNew && getIsValid())) { DdtCoagulogram coagulgramm = (DdtCoagulogram)getObject(); coagulgramm.HospitalitySession = hospitalitySession.ObjectId; coagulgramm.Doctor = hospitalitySession.CuringDoctor; coagulgramm.Patient = hospitalitySession.Patient; objectId = DbDataService.GetInstance().GetDdtCoagulogramService().Save(coagulgramm); hasChanges = false; isNew = false; } }
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 ambulanceLettersItem_Click(object sender, EventArgs e) { IEnumerator it = hospitalPatientsTbl.SelectedRows.GetEnumerator(); if (it.MoveNext()) { DataGridViewRow row = (DataGridViewRow)it.Current; DataGridViewCell cell = row.Cells[0]; string value = cell.Value.ToString(); DdtHospital hospitalSession = service.GetDdtHospitalService().GetById(value); AmbulanceLetters form = new AmbulanceLetters(service, hospitalSession); form.ShowDialog(); } }
private void releasePatient_Click(object sender, EventArgs e) { IEnumerator it = hospitalPatientsTbl.SelectedRows.GetEnumerator(); if (it.MoveNext()) { DataGridViewRow row = (DataGridViewRow)it.Current; DataGridViewCell cell = row.Cells[0]; string value = cell.Value.ToString(); DdtHospital hospitalSession = service.GetDdtHospitalService().GetById(value); ReleasePatient dialog = new ReleasePatient(service, hospitalSession, null); dialog.ShowDialog(); } }
public void saveObject(DdtHospital hospitalitySession, string parentId, string parentType) { DdtJournal journal = (DdtJournal)getObject(); journal.JournalDayId = parentId; journal.ReleaseJournal = isReleaseJournal; journal.JournalDayId = parentId; journal.Freeze = freeze.Checked; journal.Weight = 1; journal.Doctor = hospitalitySession.DutyDoctor; objId = DbDataService.GetInstance().GetDdtJournalService().Save(journal); isNew = false; hasChanges = false; }
private void analysisItem_Click(object sender, EventArgs e) { IEnumerator it = hospitalPatientsTbl.SelectedRows.GetEnumerator(); if (it.MoveNext()) { DataGridViewRow row = (DataGridViewRow)it.Current; DataGridViewCell cell = row.Cells[0]; string value = cell.Value.ToString(); DataService service = new DataService(); DdtHospital hospitalSession = service.queryObject <DdtHospital>(@"select * from ddt_hospital where r_object_id='" + value + "'"); AnalysisCabinet form = new AnalysisCabinet(hospitalSession); form.ShowDialog(); } }
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); }
public JournalBeforeKag(IDbDataService service, DdtHospital hospitalitySession, string journalId, int journalType) { InitializeComponent(); this.service = service; this.hospitalitySession = hospitalitySession; this.journalDayId = journalId; initJournals(); 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, journalDayId, DdtJournalDay.NAME, validTypes); SilentSaver.setForm(this); }
public Transfusion(IDbDataService service, DdtHospital hospitalSession, string transfusionId) { this.service = service; this.hospitalSession = hospitalSession; patient = service.GetDdtPatientService().GetById(hospitalSession.Patient); if (!String.IsNullOrEmpty(transfusionId)) { transfusion = service.GetDdtTransfusionService().GetById(transfusionId); ConsiliumId = transfusion.Consilium; BloodAnalysisId = transfusion.BloodAnalysis; bloodAnalysis = service.GetDdtBloodAnalysisService().GetById(transfusion.BloodAnalysis); } InitializeComponent(); InitControls(); }
public void saveObject(DdtHospital hospitalitySession, string parentId, string parentType) { if (isEditable && (isDirty() || isNew && getIsValid())) { DdtBloodAnalysis bloodObj = (DdtBloodAnalysis)getObject(); bloodObj.HospitalitySession = hospitalitySession.ObjectId; bloodObj.Doctor = hospitalitySession.CuringDoctor; bloodObj.Patient = hospitalitySession.Patient; bloodObj.ParentType = parentType; bloodObj.Parent = parentId; objectId = DbDataService.GetInstance().GetDdtBloodAnalysisService().Save(bloodObj); hasChanges = false; isNew = false; } }
private void deadConstatationItem_Click(object sender, EventArgs e) { IEnumerator it = hospitalPatientsTbl.SelectedRows.GetEnumerator(); if (it.MoveNext()) { DataGridViewRow row = (DataGridViewRow)it.Current; DataGridViewCell cell = row.Cells[0]; string value = cell.Value.ToString(); DdtHospital hospitalSession = service.GetDdtHospitalService().GetById(value); DdvPatient patient = service.GetDdvPatientService().GetById(hospitalSession.Patient); Death form = new Death(hospitalSession, patient); form.ShowDialog(); } }
public void saveObject(DdtHospital hospitalitySession, string parentId, string parentType) { if (string.IsNullOrEmpty(deferredJournalTxt.Text) || !(hasChanges || isNew)) { return; } DdtJournal journal = (DdtJournal)getObject(); journal.HospitalitySession = hospitalitySession.ObjectId; journal.Patient = hospitalitySession.Patient; journal.Doctor = string.IsNullOrEmpty(journal.Doctor) ? hospitalitySession.CuringDoctor : journal.Doctor; objectId = DbDataService.GetInstance().GetDdtJournalService().Save(journal); hasChanges = false; isNew = false; }
public AnalysisContainer(IDbDataService service, DdtHospital hospitalitySession, string typeName, string objectId) { this.service = service; this.hospitalitySession = hospitalitySession; this.typeName = typeName; this.currentId = objectId; selectedIds = new List <string>(); InitializeComponent(); bool isHorizontalStyle = DdtEkg.NAME.Equals(typeName, StringComparison.Ordinal) || DdtEgds.NAME.Equals(typeName, StringComparison.Ordinal) || DdtHolter.NAME.Equals(typeName, StringComparison.Ordinal); combainingContainer.GrowStyle = isHorizontalStyle ? TableLayoutPanelGrowStyle.AddRows : TableLayoutPanelGrowStyle.AddColumns; combainingContainer.RowStyles.Clear(); combainingContainer.RowStyles.Add(new RowStyle(SizeType.AutoSize)); initControls(); initTitle(); }
public ReleasePatient(IDbDataService service, DdtHospital hospitalitySession, string epicrisisId) { this.service = service; this.epicrisisId = epicrisisId; this.hospitalitySession = hospitalitySession; releasePatientInfo = new DdtReleasePatient(); releasePatientInfo.HospitalitySession = hospitalitySession.ObjectId; releasePatientInfo.Doctor = hospitalitySession.DutyDoctor; releasePatientInfo.Patient = hospitalitySession.Patient; InitializeComponent(); DdvPatient patient = service.GetDdvPatientService().GetById(hospitalitySession.Patient); if (patient != null) { Text += " " + patient.ShortName; } }