Skip to content

Commit

Permalink
Added medicine_administration field (#1025)
Browse files Browse the repository at this point in the history
* added medicine_administration field

* removed unused import
  • Loading branch information
shivankacker authored Sep 20, 2022
1 parent b717ef8 commit 8bd904f
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 2 deletions.
14 changes: 14 additions & 0 deletions care/facility/migrations/0318_merge_20220917_2113.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Generated by Django 2.2.11 on 2022-09-17 15:43

from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('facility', '0317_merge_20220915_2209'),
('facility', '0315_auto_20220909_0925'),
]

operations = [
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Generated by Django 2.2.11 on 2022-09-17 16:03

import django.contrib.postgres.fields.jsonb
from django.db import migrations


class Migration(migrations.Migration):

dependencies = [
('facility', '0318_merge_20220917_2113'),
]

operations = [
migrations.AddField(
model_name='dailyround',
name='medicine_administration',
field=django.contrib.postgres.fields.jsonb.JSONField(default=list),
),
]
4 changes: 4 additions & 0 deletions care/facility/models/daily_round.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,6 +435,10 @@ class InsulinIntakeFrequencyType(enum.Enum):
default=list, validators=[JSONFieldSchemaValidator(NURSING_PROCEDURE)]
)

medicine_administration = JSONField(
default=list,
)

meta = JSONField(default=dict, validators=[JSONFieldSchemaValidator(META)])

def cztn(self, value):
Expand Down
4 changes: 2 additions & 2 deletions care/facility/models/json_schema/daily_round.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"items": [
{
"type": "object",
"properties": {"name": {"type": "string"}, "quantity": {"type": "number"},},
"properties": {"name": {"type": "string"}, "quantity": {"type": "number"}, },
"additionalProperties": False,
"required": ["name", "quantity"],
}
Expand Down Expand Up @@ -63,7 +63,7 @@
"items": [
{
"type": "object",
"properties": {"name": {"type": "string"}, "quantity": {"type": "number"},},
"properties": {"name": {"type": "string"}, "quantity": {"type": "number"}, },
"additionalProperties": False,
"required": ["name", "quantity"],
}
Expand Down

0 comments on commit 8bd904f

Please sign in to comment.