-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OP-1199 - Voucher Scheme new features (Subservices and subitems) #44
Conversation
…ent + requete sous-service
Merge openIMIS develop to Fork Develop
Community Main to fork Main
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
can you please fix the TC |
And add test case for your features to make sure no one will break them |
poke @mngoe |
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
@delcroip i have added some test cases, all seem ok now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please check my comments, I don't see anything blocking but the required GQL element,
medical/gql_mutations.py
Outdated
] | ||
for field in fields: | ||
if hasattr(item_service, field): | ||
setattr(item_service, field, None) | ||
|
||
|
||
def update_or_create_item_or_service(data, user, item_service_model): | ||
items = data.pop('items') if 'items' in data else [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to check here, for the product this code lead to removal of all item/services if the item and services were not loaded.
I aim to fix the product by having the default as None and in that case I could assume that no change was requested, this approach have the limitation that the FE should send the section items/services only when loaded beforehand; (FE part not implemented in Product therefore I consider [] as no change)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not blocking for the merge
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
medical/migrations/.DS_Store
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this file required ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not. Just temporary files from Mac OS not present in the gitignore, sorry.
@kevel-dev Please remove it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
medical/models.py
Outdated
@@ -164,12 +166,14 @@ class Service(VersionedModel, ItemOrService): | |||
code = models.CharField(db_column='ServCode', max_length=6) | |||
name = models.CharField(db_column='ServName', max_length=100) | |||
type = models.CharField(db_column='ServType', max_length=1) | |||
packagetype = models.CharField(db_column='ServPackageType', max_length=1, default="S") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI, a textchoice class will be more restrictive therefore avoid errors
here an example https://github.com/openimis/openimis-be-payroll_py/blob/3a862282e081356c1fa03a6868c606c294855894/payroll/models.py#L10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
medical/models.py
Outdated
level = models.CharField(db_column='ServLevel', max_length=1) | ||
price = models.DecimalField(db_column='ServPrice', max_digits=18, decimal_places=2) | ||
maximum_amount = models.DecimalField(db_column='MaximumAmount', max_digits=18, decimal_places=2, blank=True, null=True) | ||
care_type = models.CharField(db_column='ServCareType', max_length=1) | ||
frequency = models.SmallIntegerField(db_column='ServFrequency', blank=True, null=True) | ||
patient_category = models.SmallIntegerField(db_column='ServPatCat') | ||
patient_category = models.SmallIntegerField(db_column='ServPatCat', default="15") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default should have a CONSTANT to make the code more readable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
@kevel-dev @mngoe , in nepal we have a status that can be set to dead, there is a reason that use an external table InsureeStatusReason so somehow it replace your changes |
No description provided.