public PatientDescriptionReportBuilder(ConnectionFactory factory, Config config, Patient patient) : base(ReportBuilderId.PatientDescription) { AddDataSource("ReportsDataSet_Prescriptions", PrescriptionsReportBuilder.GetPrescriptionsTable(factory, patient.Id)); AddHandbooksInfo(patient.patientDescription, config[HandbookGroupId.PatientDescription]); AddHandbooksInfo(patient.patientData, config[HandbookGroupId.PatientData]); using (GmConnection conn = factory.CreateConnection()) { AddParameter("Age", patient.GetAgeStr(conn)); AddParameter("DoctorName", patient.GetDoctorName(conn)); AddParameter("ChiefName", patient.GetChiefName(conn)); AddParameter("PatientName", patient.GetPatientName(conn)); GenderId genderId = patient.GetGender(conn); AddParameter("EndingOi", GenderUtils.GetEndingOi(genderId)); //2 Больн(ой) (-ая) AddParameter("EndingA", GenderUtils.GetEndingA(genderId)); AddParameter("EndingGo", GenderUtils.GetEndingGo(genderId)); AddParameter("PatientSex", GenderUtils.GetGender(genderId)); AddParameter("Analyses", patient.GetAnalysesList(conn)); AddParameter("Examinations", patient.GetExamination(conn)); //80 Обследования } AddParameter("DescriptionTime", patient.patientData.descriptionTime, "dd.MM.yy HH:mm"); //1 Дата и время жалоб AddParameter("AdmissionDiagnosis", patient.patientDiagnoses.admissionDiagnosis); //3 Предварительный диагноз AddParameter("SickListStartDate", patient.patientData.sickListStartDate); //15 Дата начала больничного AddParameter("DepartmentName", config.departmentConfig.departmentName); AddParameter("HospitalName", config.departmentConfig.hospitalName); AddParameter("PulseShortage", GetPulseShortage(patient.patientDescription)); AddParameter("ECGData", patient.patientData["ECG"]); }
public ReacardReportBuilder(ConnectionFactory factory, Config config, Patient patient, Reacard reacard) : base(ReportBuilderId.Prescriptions) { this.patient = patient; this.reacard = reacard; AddDataSource("ReportsDataSet_ReacardDescriptions", GetReacardDescriptionsTable(factory)); AddDataSource("ReportsDataSet_ReacardPrescriptions", GetReacardPrescriptionsTable(factory)); Analysis analysis = null; using (GmConnection conn = factory.CreateConnection()) { AddParameter("Age", patient.GetAgeStr(conn)); AddParameter("PatientName", patient.GetPatientName(conn)); GenderId gid = patient.GetGender(conn); AddParameter("Gender", GenderUtils.GetGender(gid)); analysis = Analysis.GetLastAnalysis(conn, patient.Id, "BloodGroupAndRhesusFactor"); } AddHandbooksInfo(patient.patientData, config[HandbookGroupId.PatientData]); AddHandbooksInfo(reacard.reacardData, config[HandbookGroupId.ReacardData]); AddParameter("Diet", patient.dietNumber); try { int output = GetReacardDataInt("Diuresis") + GetReacardDataInt("Stool"); int balance = GetReacardDataInt("Input") + GetReacardDataInt("DrankWater") - output; AddParameter("Output", output.ToString()); AddParameter("Balance", balance.ToString()); } catch (Exception ex) { Log.Exception(ex); } if (analysis != null) { AddParameter("BloodGroup", analysis.analysisData); AddParameter("RhesusFactor", analysis.analysisData); } else { AddParameter("BloodGroup", ""); AddParameter("RhesusFactor", ""); } }