Open chris-dare opened 2 years ago
Hi @TuyizereBapt I'm yet to complete the description for this issue and will notify you once complete
Hi @TuyizereBapt,
I'm done updating the issue. This is a task due next Tuesday
@TuyizereBapt @seddie62 do you have any questions on this task?
Hey @dexios1 what should happen for new HealthCareServices, Stocks and ChargeItems for already existing provider organizations without RevenueTags set ye?
Hey @dexios1 what should happen for new HealthCareServices, Stocks and ChargeItems for already existing provider organizations without RevenueTags set ye?
For HealthcareService
, the revenue tage display default should be "Other"
For Stock
, it should be "Pharmacy"
For ChargeItem, it should be None
Hey @dexios1 what should happen for new HealthCareServices, Stocks and ChargeItems for already existing provider organizations without RevenueTags set ye?
For
HealthcareService
, the revenue tage display default should be "Other"For
Stock
, it should be "Pharmacy"For ChargeItem, it should be None
I get that. But remember it's just revenue_tag_display field only, there is also revenue_tag ForeignKey field. Do you mean this foreign key can be set to null in such a case?
Done. Up for review now
Here is the PR
Noted. Will check it out
@dexios1 have you merged it?
Just did
Kind regards, Chris Dare
E: @.**@.> P: +233 26 226 0986 / +250 786 745 117<tel:+233%2026%20226%200986%20/%20+250%20786%20745%20117> W: http://chrisdare.mehttp://chrisdare.me/ [LinkedIn]https://linkedin.com/in/csdare/[Twitter]https://twitter.com/chrisdare_
From: seddie62 @.> Sent: Thursday, March 3, 2022 9:45:09 AM To: serenity-health/roadmap @.> Cc: Chris Dare @.>; Mention @.> Subject: Re: [serenity-health/roadmap] feature/set up revenue tags for reporting (Issue #101)
— Reply to this email directly, view it on GitHubhttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fserenity-health%2Froadmap%2Fissues%2F101%23issuecomment-1057861668&data=04%7C01%7C%7Cea250b3517ee45dbebd608d9fcfa81a8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637818975114084795%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=5sZm64PP7q6MOdRP76u%2FUQQfufyMdsuocm4EzfGq7dM%3D&reserved=0, or unsubscribehttps://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAEMSXLMTWW6ZDBDCGAR5HGTU6CC2LANCNFSM5OVUI7GA&data=04%7C01%7C%7Cea250b3517ee45dbebd608d9fcfa81a8%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637818975114084795%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=SHODAy%2Frsbnp7sAhswIomjFov%2BIWIebKZiG%2BNSwiejI%3D&reserved=0. You are receiving this because you were mentioned.Message ID: @.***>
Hi @seddie62 please let me know when this is integrated on the frontend
@dexios1 @TuyizereBapt what is the api needed here to get all possible values and what is the field to be added
Hey @dexios1 what should happen for new HealthCareServices, Stocks and ChargeItems for already existing provider organizations without RevenueTags set ye?
For
HealthcareService
, the revenue tage display default should be "Other" ForStock
, it should be "Pharmacy" For ChargeItem, it should be NoneI get that. But remember it's just revenue_tag_display field only, there is also revenue_tag ForeignKey field. Do you mean this foreign key can be set to null in such a case?
@TuyizereBapt sorry, I missed this. I think it depends on the final implementation. If the default revenue tags are set up, then there's no need for nullables, but if they aren't, then there's a need for that.
@dexios1 @TuyizereBapt what is the api needed here to get all possible values and what is the field to be added
Hi @seddie62,
the field's key is revenue_tag_display
. Please give this a label of "Revenue tag"
This is the endpoint to get all possible values: {{base_url}}/providers/<provider_id>/revenue-tag-type
@TuyizereBapt please share the link to the API spec with @seddie62
@dexios1 @TuyizereBapt what is the api needed here to get all possible values and what is the field to be added
Hi @seddie62,
the field's key is
revenue_tag_display
. Please give this a label of "Revenue tag"This is the endpoint to get all possible values:
{{base_url}}/providers/<provider_id>/revenue-tag-type
@TuyizereBapt please share the link to the API spec with @seddie62
Here is the API spec: https://serenity-health.readme.io/reference/valuesets
is the field required? @dexios1 @TuyizereBapt
So I'm guessing this hasn't been merged? @dexios1
Here is the API spec: https://serenity-health.readme.io/reference/valuesets
@TuyizereBapt I'm referring to the actual field revenue_tag_display on the services API, is that required?
No. It will be set to default value if you do not provide a revenue_tag_display
value on creation
Hi @seddie62 @TuyizereBapt,
I'm just reviewing the API for the revenue tag valueset. @TuyizereBapt it needs to be {{base_url}}/providers/{{serenity_user_provider_id}}/valueset/revenue-tags
and registered in provider.valueset.urls
@TuyizereBapt I'm referring to the actual field revenue_tag_display on the services API, is that required?
Yes, Jean is right the API will do that. @seddie62 what you need to do on the frontend is to set the revenue tag to the default of "Other" for healthcare services. You need to do this so that users are not confused on how the defaults will be set up
@pkdadson for stock items, this will be "Pharmacy"
I don't think that url is possible considering that the sub paths for valueset under provider do not have
Example: provider.urls -
path("/valueset/", include("provider.valueset.urls")),
For the above url to work, it would require the above url to
path("/<provider_id>/valueset/", include("provider.valueset.urls")),
I don't think that url is possible considering that the sub paths for valueset under provider do not have
Example: provider.urls - path("/valueset/", include("provider.valueset.urls")),
For the above url to work, it would require the above url to be altered to path("/<provider_id>/valueset/", include("provider.valueset.urls")),
I don't think that url is possible considering that the sub paths for valueset under provider do not have
Example: provider.urls - path("/valueset/", include("provider.valueset.urls")),
For the above url to work, it would require the above url topath("/<provider_id>/valueset/", include("provider.valueset.urls")),
I don't think that url is possible considering that the sub paths for valueset under provider do not have
Example: provider.urls -
path("/valueset/", include("provider.valueset.urls")),
For the above url to work, it would require the above url to be altered to
path("/<provider_id>/valueset/", include("provider.valueset.urls")),
Ah...got it. Alright. Then this is fine. Thanks a lot!
Tell us about your request! Providers need set the custom categories for their services and products. We can acheive this with revenue tags
Which app does this concern? Provider portal
What will be benefit of this feature? Revenue tags will help providers report on their bills the way they like
Describe the solution you'd like On the API:
Create a model called
RevenueTag
. It should extendResourceModel
and have the following fields: a.display
: (unique and case insensitive) - Charfield with maxlength 256 (This will be the name of the revenue tag) b.created_by
: FK toAuthenticationmanager.User
c.is_core
: boolean with a default offalse
(each provider will have core default revenue tags which cannot be deleted. We will use this flag to identify which tags these are) d.Organization
: FK toOrganization
Update the
Organization.create
method such that if the type of the organization isPROV
, then the following revenue tags will be created: a. Name="Other", created_by=self.owner, organization=self, is_core=True, organization=selfb. Name="Pharmacy", created_by=self.owner, organization=self, is_core=True, organization=self
Extend the
Healthcareservice
,Stock
andChargeItem
model with the following properties: a. revenue_tag: FK toRevenueTag
b. revenue_tag_display: Charfield with maxlength 256
Whenever instances of the Healthcareservice model are saved, do the following:
a. if revenue_tag_display is not None, get
revenue_tag
with the display ofrevenue_tag_display
and set it toself.revenue_tag
b. else get the revenue tag of that organization with the display of
Other
and set thatrevenue_tag
andrevenue_tag_display
Extend the HealthcareserviceSerializer to expose the
revenue_tag_display
property Whenever instances of the Stock model is saved, do the following:a. if revenue_tag_display is not None, get
revenue_tag
with the display ofrevenue_tag_display
and set it toself.revenue_tag
b. else get the revenue tag of that organization with the display of
Pharmacy
and set thatrevenue_tag
andrevenue_tag_display
Whenever instances of the ChargeItem model is created, do the following: a. If the service category is medication, get the
revenue tag
of the related stock item and set therevenue_tag
andrevenue_tag_display
of the charge item instanceb. else get the revenue tag of the related Healthcare service and set the
revenue_tag
andrevenue_tag_display
of the charge item instancec. if these throw an error, then get the revenue tag of that organization named
Other
and set thatrevenue_tag
andrevenue_tag_display
** Implement this behavior in a method named
set_revenue_tag
so can be called on the charge item instanceNB: You will need to extend the ChargeItem model to have a foreign key to the Stock model to simply this task. It will also help with other features and BI moving forward
Be sure to catch necessary exceptions
provider.valueset.views
and implemented likediagnostics.views.DiagnosticTestCodeValuesetListView
b. In addition to the above, you need to filter and return revenue tags that belong to a specific provider c. Register this API view inprovider.valueset.urls
with the path name/<provider_id>/revenue-tag-type
d. Document this API on readme under the provider portal in a new section titled "valuesets" The endpoint will be{{base_url}}/providers/<provider_id>/revenue-tag-type
NB: Be sure to remove the unique_together constraint in the healthcare service migration that will raise a bug. Ref: #82
On the frontend, Extend Healthcare service create and edit use cases such it it allows users to save the revenue tag based on values from
{{base_url}}/providers/<provider_id>/revenue-tag-type
API endpoint can be found here
Describe alternatives you've considered N/A
Additional context N/A