Skip to content

Commit

Permalink
change to verbose name
Browse files Browse the repository at this point in the history
  • Loading branch information
danfordnchembi committed Jul 25, 2023
1 parent 6c41875 commit 59fd516
Show file tree
Hide file tree
Showing 16 changed files with 26,320 additions and 504 deletions.
Binary file modified .DS_Store
Binary file not shown.
796 changes: 309 additions & 487 deletions .idea/workspace.xml

Large diffs are not rendered by default.

61 changes: 61 additions & 0 deletions Core/migrations/0016_auto_20230725_2317.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# Generated by Django 3.2 on 2023-07-25 20:17

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('Core', '0015_auto_20220731_0320'),
]

operations = [
migrations.AlterModelOptions(
name='bedoccupancy',
options={'verbose_name_plural': '7. Bed occupancy'},
),
migrations.AlterModelOptions(
name='bedoccupancyitems',
options={'verbose_name_plural': '8. Bed occupancy Items'},
),
migrations.AlterModelOptions(
name='bedoccupancyreport',
options={'verbose_name_plural': '9. Bed occupancy Report'},
),
migrations.AlterModelOptions(
name='deathbydiseasecaseatfacility',
options={'verbose_name_plural': '3. Death by Disease Cases at Facility'},
),
migrations.AlterModelOptions(
name='deathbydiseasecaseatfacilityitems',
options={'verbose_name_plural': '4. Death by Disease Cases at Facility Items'},
),
migrations.AlterModelOptions(
name='deathbydiseasecasenotatfacility',
options={'verbose_name_plural': '5. Death by Disease Cases Not at Facility'},
),
migrations.AlterModelOptions(
name='deathbydiseasecasenotatfacilityitems',
options={'verbose_name_plural': '6. Death by Disease Cases Not at Facility Items'},
),
migrations.AlterModelOptions(
name='revenuereceived',
options={'verbose_name_plural': '10. Revenue received'},
),
migrations.AlterModelOptions(
name='revenuereceiveditems',
options={'verbose_name_plural': '11. Revenue Received Items'},
),
migrations.AlterModelOptions(
name='servicereceived',
options={'verbose_name_plural': '1. Services Received'},
),
migrations.AlterModelOptions(
name='servicereceiveditems',
options={'verbose_name_plural': '2. Services Received Items'},
),
migrations.AlterModelOptions(
name='servicesreceiveddataset',
options={'verbose_name_plural': '12. Services Received Dataset'},
),
]
24 changes: 13 additions & 11 deletions Core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def __str__(self):

class Meta:
db_table = 'ServiceReceived'
verbose_name_plural = 'Services Received'
verbose_name_plural = '1. Services Received'


class ServiceReceivedItems(models.Model):
Expand All @@ -41,7 +41,7 @@ def __str__(self):

class Meta:
db_table = 'ServiceReceivedItems'
verbose_name_plural = 'Services Received Items'
verbose_name_plural = '2. Services Received Items'


class DeathByDiseaseCaseAtFacility(models.Model):
Expand All @@ -55,7 +55,7 @@ def __str__(self):

class Meta:
db_table = 'DeathByDiseaseCaseAtFacility'
verbose_name_plural = "Death by Disease Cases at Facility"
verbose_name_plural = "3. Death by Disease Cases at Facility"


class DeathByDiseaseCaseAtFacilityItems(models.Model):
Expand All @@ -78,7 +78,7 @@ def __str__(self):

class Meta:
db_table = 'DeathByDiseaseCaseAtFacilityItems'
verbose_name_plural = "Death by Disease Cases at Facility Items"
verbose_name_plural = "4. Death by Disease Cases at Facility Items"


class DeathByDiseaseCaseNotAtFacility(models.Model):
Expand All @@ -92,7 +92,7 @@ def __str__(self):

class Meta:
db_table = 'DeathByDiseaseCaseNotAtFacility'
verbose_name_plural = "Death by Disease Cases Not at Facility"
verbose_name_plural = "5. Death by Disease Cases Not at Facility"


class DeathByDiseaseCaseNotAtFacilityItems(models.Model):
Expand All @@ -111,7 +111,7 @@ def __str__(self):

class Meta:
db_table = 'DeathByDiseaseCaseNotAtFacilityItems'
verbose_name_plural = "Death by Disease Cases Not at Facility Items"
verbose_name_plural = "6. Death by Disease Cases Not at Facility Items"


class BedOccupancy(models.Model):
Expand All @@ -126,7 +126,7 @@ def __str__(self):

class Meta:
db_table = 'BedOccupancy'
verbose_name_plural = "Bed occupancy"
verbose_name_plural = "7. Bed occupancy"


class BedOccupancyItems(models.Model):
Expand All @@ -142,7 +142,7 @@ def __str__(self):

class Meta:
db_table = 'BedOccupancyItems'
verbose_name_plural = "Bed occupancy Items"
verbose_name_plural = "8. Bed occupancy Items"


class BedOccupancyReport(models.Model):
Expand All @@ -159,6 +159,7 @@ def __str__(self):

class Meta:
db_table = "BedOccupancyReport"
verbose_name_plural = "9. Bed occupancy Report"


class RevenueReceived(models.Model):
Expand All @@ -172,7 +173,7 @@ def __str__(self):

class Meta:
db_table = 'RevenueReceived'
verbose_name_plural = "Revenue received"
verbose_name_plural = "10. Revenue received"


class RevenueReceivedItems(models.Model):
Expand All @@ -194,7 +195,7 @@ def __str__(self):

class Meta:
db_table = 'RevenueReceivedItems'
verbose_name_plural = "Revenue Received Items"
verbose_name_plural = "11. Revenue Received Items"


class ServicesReceivedDataset(models.Model):
Expand Down Expand Up @@ -229,4 +230,5 @@ def __str__(self):
region = models.CharField(max_length=255, null=True, blank=True)

class Meta:
db_table = 'ServicesReceivedDataset'
db_table = 'ServicesReceivedDataset'
verbose_name_plural = "12. Services Received Dataset"
12 changes: 12 additions & 0 deletions Core/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -570,6 +570,18 @@ def query_services_received():

return row


def query_revenue_received():
cursor = connection.cursor()

raw_query = ''' '''

cursor.execute(raw_query)

row = cursor.fetchall()

return row

@app.task()
def load_services_received():
services_received = query_services_received()
Expand Down
29 changes: 29 additions & 0 deletions DHIS/migrations/0011_auto_20230725_2317.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Generated by Django 3.2 on 2023-07-25 20:17

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('DHIS', '0010_auto_20220730_1436'),
]

operations = [
migrations.AlterModelOptions(
name='categoryoptioncombo',
options={'verbose_name_plural': '3. Category Option Combo'},
),
migrations.AlterModelOptions(
name='categoryoptioncombodataelementmapping',
options={'verbose_name_plural': '4. Category Option Combo Data Element Mapping'},
),
migrations.AlterModelOptions(
name='dataelement',
options={'verbose_name_plural': '2. Data Elements'},
),
migrations.AlterModelOptions(
name='organisationunit',
options={'verbose_name_plural': '1. Organization Units'},
),
]
7 changes: 5 additions & 2 deletions DHIS/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ def __str__(self):

class Meta:
db_table = "organisation_units"
verbose_name_plural = "1. Organization Units"


class DataElement(models.Model):
Expand Down Expand Up @@ -69,6 +70,7 @@ def __str__(self):

class Meta:
db_table = "data_elements"
verbose_name_plural = "2. Data Elements"


class CategoryOptionCombo(models.Model):
Expand All @@ -80,7 +82,8 @@ def __str__(self):

class Meta:
db_table = "category_option_combo"
verbose_name_plural = "Category Option Combo"
verbose_name_plural = "3. Category Option Combo"



class CategoryOptionComboDataElementMapping(models.Model):
Expand All @@ -92,4 +95,4 @@ def __str__(self):

class Meta:
db_table = "category_option_combo_data_element_mapping"
verbose_name_plural = "Category Option Combo Data Element Mapping"
verbose_name_plural = "4. Category Option Combo Data Element Mapping"
Loading

0 comments on commit 59fd516

Please sign in to comment.