Skip to content

Commit

Permalink
Merge pull request #209 from ertush/dev
Browse files Browse the repository at this point in the history
added all bed categories in the facility export view and query
  • Loading branch information
ertush authored Jan 31, 2025
2 parents 6a85d5d + d3c4b97 commit 8c241da
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
10 changes: 10 additions & 0 deletions facilities/models/facility_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -1022,6 +1022,16 @@ class FacilityExportExcelMaterialView(models.Model):
help_text='The name of the facility\'s regulator')
beds = models.IntegerField(
help_text='The number of beds in the facility')
number_of_emergency_casualty_beds = models.IntegerField(
help_text='The number of causualty emergency beds in the facility')
number_of_icu_beds = models.IntegerField(
help_text='The number of icu beds in the facility')
number_of_hdu_beds = models.IntegerField(
help_text='The number of hdu beds in the facility')
number_of_inpatient_beds = models.IntegerField(
help_text='The number of Inpatient beds in the facility')
number_of_isolation_beds = models.IntegerField(
help_text='The number of isolation beds in the facility')
cots = models.IntegerField(
help_text='The number of cots in the facility')
search = models.CharField(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@ DROP MATERIALIZED VIEW IF EXISTS facilities_excel_export;
CREATE MATERIALIZED VIEW facilities_excel_export AS
SELECT facilities_facility.id as id, facilities_facility.search as search,
facilities_facility.name as name, facilities_facility.official_name as officialname, facilities_facility.code as code,
facilities_facility.registration_number, facilities_facility.number_of_beds as beds,
facilities_facility.registration_number, facilities_facility.number_of_beds as beds, facilities_facility.number_of_emergency_casualty_beds as number_of_emergency_casualty_beds,
facilities_facility.number_of_icu_beds as number_of_icu_beds, facilities_facility.number_of_hdu_beds as number_of_hdu_beds,
facilities_facility.number_of_inpatient_beds as number_of_inpatient_beds, facilities_facility.number_of_maternity_beds as number_of_maternity_beds,
facilities_facility.number_of_isolation_beds as number_of_isolation_beds,
facilities_facility.number_of_cots as cots, common_ward.name as ward_name,
common_ward.id as ward,facilities_facility.approved,facilities_facility.created,
facilities_facility.updated,
Expand Down

0 comments on commit 8c241da

Please sign in to comment.