bcgov / digital-journeys

PSA Forms System
https://bcgov.github.io/digital-journeys/
Apache License 2.0
8 stars 7 forks source link

Cold/Flu: 'Registered Clinics for this Worksite' #990

Closed Stella-Archer closed 1 year ago

Stella-Archer commented 1 year ago

User Story “As a user registering a worksite, I want see all the clinics already registered at my worksite so I can contact and coordinate with colleagues who have already registered.”

Tasks

Acceptance Criteria

EduardoRamirezBC commented 1 year ago

Meeting with Mike needed. Caleb/Stella. Stella will setup.

Stella-Archer commented 1 year ago

waiting for API to Fill data

bhumin-fw commented 1 year ago

@mikeshi-bcgov We need one API endpoint. which returns clinics/registrations filter by WorksiteID. Once schema fix please prepare this API endpoint on priority. Please see the ticket details for required keys in response for each clinics/registrations. (fields are Worksite Contact, Ministry, Type Of Clinic/Registration, Number of Employees)

mikeshi-bcgov commented 1 year ago

@bhumin-fw Sure Bhumin, I will bring this to the team in this afternoon's meeting, to see how to present these fields out of the new schema

Stella-Archer commented 1 year ago

Is #1000 blocking this?

bhumin-fw commented 1 year ago

@Stella-Archer yes #1000 blocking this ticket.

bhumin-fw commented 1 year ago

@mikeshi-bcgov https://analytics-testapi.psa.gov.bc.ca/apiserver/api.rsc/ods_datamart_influenza_worksites/ https://analytics-testapi.psa.gov.bc.ca/apiserver/api.rsc/ods_datamart_influenza_worksite_ministries/ Above API endpoints only give worksites list or mapping.

We need below API endpoints:

  1. Worksite list filter by provided ministry_id. (When we pass ministry_id in API endpoint it will only list worksites link to that ministry. Right now I have to fetch worksite ids and then have to trigger worksites API)

  2. Registrations based on provided worksiteID.

    • This API endpoint should accept worksite_id as filter in request and in response it should send registrations under selected worksites. response should contain at-least below value worksite-contact: String (name of primary contact) registration-type: String (value of is_closed key from registration table which contain "open" & "closed" as value) ministry: String (Name of registration's ministry) number-of-employee: Int (number of employee value from registration table)

FYI: This is priority along side add/update registration API.

mikeshi-bcgov commented 1 year ago

@bhumin-fw Endpoint for the first requested is now available, which is based on a view so you can only do GET:

https://analytics-testapi.psa.gov.bc.ca/apiserver/api.rsc/ods_datamart_influenza_vw_worksites_ministries_joined/

bhumin-fw commented 1 year ago

@mikeshi-bcgov It did revert blank, do I need to pass filter here? or you are cleaning and reloading tables? {'@odata.context': 'https://analytics-testapi.psa.gov.bc.ca/apiserver/api.rsc/$metadata#ods_datamart_influenza_vw_worksites_ministries_joined', 'value': []}

EduardoRamirezBC commented 1 year ago

Mike: the data was reloaded.

EduardoRamirezBC commented 1 year ago

@mikeshi-bcgov to add two entries for registration table.

mikeshi-bcgov commented 1 year ago

@EduardoRamirezBC Two dummy entries have been added to registrations table

mikeshi-bcgov commented 1 year ago

@bhumin-fw

API EndPoint for the item requested #2 ( 2. Registrations based on provided worksiteID.) is available now as well, please test

https://analytics-testapi.psa.gov.bc.ca/apiserver/api.rsc/ods_datamart_influenza_vw_registrations_worksites_joined/

iman-jamali-fw commented 1 year ago

I'll test the endpoint today and update the ticket.

MeghanStothers commented 1 year ago

Dummy data in for and Iman to test the endpoint today

iman-jamali-fw commented 1 year ago

@mikeshi-bcgov

The https://analytics-testapi.psa.gov.bc.ca/apiserver/api.rsc/ods_datamart_influenza_vw_registrations_worksites_joined works great and I can see the registration items including the ones I sent last night. filter by application_id also works.

Thanks!

MeghanStothers commented 1 year ago

Iman to work with Caleb and Mike to make sure in form data is in correct type.

chriscaldwell-psa commented 1 year ago

@bhumin-fw, @EduardoRamirezBC - can we connect re all endpoint tickets today for Cold & Flu. Thanks! Chris

bhumin-fw commented 1 year ago

@chriscaldwell-psa do you want to re-connect for this ticket or endpoint related ticket? It is ready to test on DEV. Note: If you make change in form above this component it will stop as need to find component using absolute path for additional property access.

chriscaldwell-psa commented 1 year ago

@bhumin-fw - Hi Bhumin, yes, let me know when we can connect today. Thanks C

Stella-Archer commented 1 year ago

@chriscaldwell-psa @bhumin-fw I'm looking for this in both DEV and TEST and don't see 'clinics at this worksite' populating is there a particular ministry/worksite combo I need to query to see the test data?

bhumin-fw commented 1 year ago

@Stella-Archer try below combination. Screenshot 2023-04-27 at 3.52.02 PM.png

Stella-Archer commented 1 year ago

Thanks @bhumin-fw oddly enough that did not work for me :( TEST image.png DEV image.png

ayushdamani commented 1 year ago

Hey @bhumin-fw , I tested this in Test and Dev and it didn't work out for me either.

Test test.png

Dev dev.png

ayushdamani commented 1 year ago

Tested again in Dev and Test - the table populates with Worksite contact, Ministry, Type of Clinic and Number of employees.

Test test1.png

Dev dev1.png

Stella-Archer commented 1 year ago

this work great, PO approved and closing this ticket image.png