def Export(request): model = (( _('Case ID'), _('Hospital registration number'), _('Date of birth'), _('Principal diagnosis code (ICD-10)'), _('Type of unit'), _('Patient allergic to aspirin?'), _('Is there a known contraindication or intolerance of aspirin?'), _('Type of discharge'), _('If other'), _('Is there a known objection/refusal to take aspirin-containing medication?'), _('Was patient prescribed at discharge to take aspirin?'), _('Was patient prescribed to take other (non-aspirin-containing) platelet aggregation inhibitor therapy?'), _('Date of discharge'), ),) cases = c20.objects.filter(added_by__personel__workplace = request.user.get_profile().workplace) for case in cases: model += (( str(case.case_id), str(case.hospital_registration_number), str(case.date_of_birth), str(case.diagnosis_code), str(case.type_of_unit), str(case.patient_allergic_aspirin), str(case.aspirin_intolerance), str(case.type_of_discharge), str(case.type_of_discharge_empty), str(case.aspirin_refusal), str(case.aspirin_at_discharge), str(case.non_aspirin_platelet), str(case.date_of_discharge), ),) return csvExport(model, 'c20_export_'+datetime.strftime(datetime.now(), "%Y-%m-%d %H:%M"))
def Export(request): model = (( _('Patients ID'), _('Case ID'), _('Date of birth'), _('Date of hospital admission'), _('Patient admission status'), _('Type of admission'), _('Was surgical procedure?'), _('Date of first surgical procedure'), _('Date of hospital discharge'), _('Patient discharge status'), _('Diagnosis group'), _('Diagnosis code: ICD-10'), _('Diagnosis code: DRG'), ),) cases = c8.objects.filter(added_by__personel__workplace = request.user.get_profile().workplace) for case in cases: model += (( str(case.patient_id), str(case.case_id), str(case.date_of_birth), str(case.date_of_admission), str(case.patient_admission_status), str(case.type_of_admission), str(case.was_surgical_procedure), str(case.date_of_surgical_procedure), str(case.date_of_discharge), str(case.patient_discharge_status), str(case.diagnosis_group), str(case.icd), str(case.drg), ),) return csvExport(model, 'c8_export_'+datetime.strftime(datetime.now(), "%Y-%m-%d %H:%M"))
def Exportp(request): model = (( _('Identifier of central operating unit'), _('Identifier of OR'), _('Date'), _('Type of day'), _('Case number'), _('Patient identifier'), _('Time patient arrives to OR'), _('Anesthesia start'), _('Surgery start'), _('Surgery end'), _('Anesthesia end'), _('Time patient leaves OR'), ),) cases = c9_patient.objects.filter(added_by__personel__workplace = request.user.get_profile().workplace) for case in cases: model += (( str(case.central_operating_unit), str(case.operating_unit), str(case.date), str(case.type_of_day), str(case.case_number), str(case.patient_identifier), str(case.patient_arrive_time)[:-3], str(case.anesthesia_start)[:-3], str(case.surgery_start)[:-3], str(case.surgery_end)[:-3], str(case.anesthesia_end)[:-3], str(case.patient_leave_time)[:-3], ),) return csvExport(model, 'c9_patient_export_'+datetime.strftime(datetime.now(), "%Y-%m-%d %H:%M"))
def Export(request): model = ( ( _("Patients ID"), _("Case ID"), _("Date of birth"), _("Date of hospital admission"), _("Patient admission status"), _("Date of hospital discharge"), _("Patient discharge status"), _("ICD-10 at that departmental admission"), ), ) cases = c31.objects.filter(added_by__personel__workplace=request.user.get_profile().workplace) for case in cases: model += ( ( str(case.patient_id), str(case.case_id), str(case.date_of_birth), str(case.date_of_admission), str(case.patient_admission_status), str(case.date_of_discharge), str(case.patient_discharge_status), str(case.icd), ), ) return csvExport(model, "c31_export_" + datetime.strftime(datetime.now(), "%Y-%m-%d %H:%M"))
def Exporto(request): model = (( _('Identifier of central operating unit'), _('Identifier of OR'), _('Type of OR'), _('Normal time of opening on weekdays'), _('Normal time of closing on weekdays'), _('Weekday number of staffed days in the observed period'), _('Normal time of opening on saturdays'), _('Normal time of closing on saturdays'), _('Saturday number of staffed days in the observed period'), _('Normal time of opening on sundays and holidays'), _('Normal time of closing on sundays and holidays'), _('Sunday/Holiday number of staffed days in the observed period'), _('Hygiene category of OR'), _('Professional field'), _('Preparatory room'), _('Post-operative observatory room'), _('Beginning of observational period'), _('End of observational period'), ),) cases = c9_operation.objects.filter(added_by__personel__workplace = request.user.get_profile().workplace) for case in cases: model += (( str(case.central_operating_unit), str(case.operating_unit), str(case.type_of_or), str(case.weekday_open_time)[:-3], str(case.weekday_close_time)[:-3], str(case.weekday_staffed_days), str(case.saturday_open_time)[:-3], str(case.saturday_close_time)[:-3], str(case.saturday_staffed_days), str(case.sunday_open_time)[:-3], str(case.sunday_close_time)[:-3], str(case.sunday_staffed_days), str(case.hygiene_category), str(case.professional_field), str(case.preparatory_room), str(case.postoperative_room), str(case.observation_begins), str(case.observation_ends), ),) return csvExport(model, 'c9_operation_room_export_'+datetime.strftime(datetime.now(), "%Y-%m-%d %H:%M"))
def Export(request): model = (( _('Job'), _('Observed year'), _('Number of needle stick injuries in the observed year'), _('Total number of hospital staff at the beginning of the year (1st January)'), _('Total number of hospital staff at the end of the year (31st December)'), _('Total number of contracted working hours for the data at the beginning of the year/day (employee+ entrepreneur)'), _('Total number of contracted working hours for the data at the end of the year /day(employee+ entrepreneur)'), ),) cases = c13.objects.filter(added_by__personel__workplace = request.user.get_profile().workplace) for case in cases: model += (( str(case.job), str(case.year), str(case.needlestick_injuries), str(case.staff_beginning), str(case.staff_end), str(case.working_hours_beginning), str(case.working_hours_end), ),) return csvExport(model, 'c13_export_'+datetime.strftime(datetime.now(), "%Y-%m-%d %H:%M"))
def Export(request): model = (( _('Patients ID'), _('Case ID'), _('Date of birth'), _('Date of delivery'), _('Time of delivery'), _('Number of previous deliveries'), _('Number of earlier deliveries by c-section'), _('The c-section'), _('Weight of newborn'), _('Mother illnes or risk'), _('Specify'), _('Diagnose code'), _('Other diagnoses'), ),) cases = c1.objects.filter(added_by__personel__workplace = request.user.get_profile().workplace) for case in cases: dob = str(case.date_of_delivery).split(' ') od = "" for other_diag in case.other_diagnoses.all(): od += str(other_diag.name)+"," model += ((str(case.patient_id), str(case.case_id), str(case.date_of_birth), str(dob[0]), str(dob[1])[:-3], str(case.number_of_prev_deliveries), str(case.number_of_prev_deliveries_by_c), str(case.the_c_section), str(case.weight_of_the_newborn), str(case.mother_illness), str(case.specify_mother_illness), str(case.drg_code), str(od)),) return csvExport(model, 'c1_export_'+datetime.strftime(datetime.now(), "%Y-%m-%d %H:%M"))
def Export(request): model = (( _('Case ID'), _('Hospital registration number'), _('Date of birth'), _('Weight of patient'), _('Principal diagnosis code (DRG)'), _('Principal procedure code'), _('Is the surgical procedure planned?'), _('Is patient allergic to any antibiotics suggested in the protocol?'), _('Generic name of antibiotic drug'), _('In case of allergy to penicillin, scale of severity?'), _('Has patient preoperative infection?'), _('Type of infection'), _('Date of surgical incision'), _('Time of surgical incision'), _('Prophylactic antibiotic given?'), _('Name of first dose'), _('Name of second dose'), _('First dose'), _('Second dose'), _('Route of administration of first dose'), _('Date of first dose'), _('Time of first dose'), _('Total doses in 24 hours'), _('Date of last dose'), _('Time of last dose'), _('Date of surgical wound closure'), _('Time of surgical wound closure'), ),) cases = c23.objects.filter(added_by__personel__workplace = request.user.get_profile().workplace) for case in cases: si = str(case.surgical_incision).split(' ') dofd = str(case.date_of_first_dose).split(' ') dold = str(case.date_of_last_dose).split(' ') dswc = str(case.date_of_wound_close).split(' ') model += (( str(case.case_id), str(case.hospital_registration_number), str(case.date_of_birth), str(case.weight_of_patient), str(case.principal_diagnoses_code), str(case.principal_procedure_code), str(case.procedure_planned), str(case.patient_allergy), str(case.generic_name_of_drug), str(case.penicilin_allergy), str(case.preoperative_infection), str(case.type_of_infection), str(si[0]), str(si[1])[:-3], str(case.antibiotic_given), str(case.name_of_first_dose), str(case.name_of_second_dose), str(case.first_dose), str(case.second_dose), str(case.route_of_admin), str(dofd[0]), str(dofd[1])[:-3], str(case.total_dose_in_24h), str(dold[0]), str(dold[1])[:-3], str(dswc[0]), str(dswc[1])[:-3], ),) return csvExport(model, 'c23_export_'+datetime.strftime(datetime.now(), "%Y-%m-%d %H:%M"))