Closed ldelacosta closed 3 months ago
Hey team! Please add your planning poker estimate with Zenhub @cferris32 @jenniemc @JunTaoLuo @ryanshaw @simiadebowale @vbahinwillit
Hi @cferris32, I’m working on a spike to research if the upcoming appointment returned contains the facility attributes with the location website. Using Judy Morrison as test user, below is an example appointment data with the long SHA number as the ID. In the location object, it has the property, website
and the associated valued string ending in “.asp”
website: "https://www.dayton.va.gov/locations/spgfld_cboc.asp”
This value is old because the URL is redirected elsewhere.
Whereas the second example with the ID starting with CERN, the location object contains a valid and current website URL. The object also contains an extra field facilitiesApiId
, that is absent from SHA appointment IDs, but may be unique to extract the correct website value.
We are after the current and valid website URL. Wherever the Cerner appointments are pulling the facility information from is what we want for SHA appointments. My question is can vets-api collect the correct website URL?
Example one
{
"id": "af4bb10d321a94a83b1acb44c1dc63fea0b7b12afca078772480189a898f721c",
"type": "appointments",
"attributes": {
"id": "af4bb10d321a94a83b1acb44c1dc63fea0b7b12afca078772480189a898f721c",
"identifier": [
{
"system": "Appointment/",
"value": "4139383437393438"
},
{
"system": "http://www.va.gov/Terminology/VistADefinedTerms/409_84",
"value": "984:7948"
}
],
"kind": "clinic",
"status": "cancelled",
"serviceType": "outpatientMentalHealth",
"serviceTypes": [
{
"coding": [
{
"system": "http://veteran.apps.va.gov/terminologies/fhir/CodeSystem/vats-service-type",
"code": "outpatientMentalHealth"
}
]
}
],
"serviceCategory": [
{
"coding": [
{
"system": "http://www.va.gov/Terminology/VistADefinedTerms/409_1",
"code": "REGULAR",
"display": "REGULAR"
}
],
"text": "REGULAR"
}
],
"reasonCode": {
"text": "reasonCode:ROUTINEVISIT|comments:Test"
},
"patientIcn": "1012845331V153043",
"locationId": "984GD",
"clinic": "3977",
"start": "2024-07-17T12:30:00Z",
"end": "2024-07-17T13:00:00Z",
"minutesDuration": 30,
"slot": {
"id": "3230323430373137313233303A323032343037313731333030",
"start": "2024-07-17T12:30:00Z",
"end": "2024-07-17T13:00:00Z"
},
"created": "2024-06-24T00:00:00Z",
"cancelationReason": {
"coding": [
{
"system": "http://www.va.gov/Terminology/VistADefinedTerms/409.2",
"code": "pat",
"display": "The appointment was cancelled by the patient"
}
]
},
"cancellable": false,
"extension": {
"ccLocation": {
"address": {}
},
"vistaStatus": [
"CANCELLED BY PATIENT"
],
"preCheckinAllowed": false,
"eCheckinAllowed": false,
"clinic": {
"physicalLocation": "SPRINGFIELD,OH",
"phoneNumber": "5700",
"phoneNumberExtension": ""
}
},
"localStartTime": "2024-07-17T08:30:00.000-04:00",
"station": "984",
"ien": "7948",
"patientComments": "Test",
"reasonForAppointment": "Routine/Follow-up",
"serviceName": "SPR MENTAL HEALTH CLIN A",
"friendlyName": "SPR MENTAL HEALTH CLIN A",
"location": {
"id": "984GD",
"type": "appointments",
"attributes": {
"id": "984GD",
"vistaSite": "984",
"vastParent": "984",
"type": "va_health_facility",
"name": "Springfield VA Clinic",
"classification": "Multi-Specialty CBOC",
"timezone": {
"timeZoneId": "America/New_York"
},
"lat": 39.94281,
"long": -83.802895,
"website": "https://www.dayton.va.gov/locations/spgfld_cboc.asp",
"phone": {
"main": "937-328-3385"
},
"physicalAddress": {
"type": "physical",
"line": [
"512 South Burnett Road"
],
"city": "Springfield",
"state": "OH",
"postalCode": "45505-2720"
},
"healthService": [
"MentalHealthCare",
"Optometry",
"Podiatry",
"PrimaryCare",
"SpecialtyCare"
]
}
}
}
},
In this example where the id begins with CERN, the website and associated value contains the current URL. website: "https://www.va.gov/spokane-health-care/locations/mann-grandstaff-department-of-veterans-affairs-medical-center/"
Notice the extra field “facilitiesApiId” that may be unique to extract the correct website value.
Example Two
{
"id": "CERN53787030",
"type": "appointments",
"attributes": {
"id": "CERN53787030",
"identifier": [
{
"system": "urn:va.gov:masv2:cerner:appointment",
"value": "https://fhir-ehr.ehr.gov/r4/d45741b3-8335-463d-ab16-8c5f0bcf78ed/Appointment/53787030/_history/2"
}
],
"kind": "clinic",
"status": "booked",
"locationId": "668",
"start": "2024-09-18T14:30:00Z",
"end": "2024-09-18T15:00:00Z",
"requestedPeriods": null,
"cancellable": true,
"patientInstruction": "Preparations:\n- If you have any non-VA medical records, including radiology images, related to this appointment, please bring them with you.\r\nIf you have other health insurance, please bring your insurance card.\r\nYou can log into the patient portal, My VA Health to view or cancel your appointment.\r\nIf you need to cancel or reschedule your appointment, please call us at (509) 434-7026.\r\nOur clinic is located on the 1st floor, Bldg 27, Primary Care",
"localStartTime": "2024-09-18T07:30:00.000-07:00",
"station": null,
"ien": null,
"location": {
"id": "668",
"type": "appointments",
"attributes": {
"id": "668",
"facilitiesApiId": "vha_668",
"vistaSite": "668",
"vastParent": "668",
"type": "va_health_facility",
"name": "Mann-Grandstaff Department of Veterans Affairs Medical Center",
"classification": "VA Medical Center (VAMC)",
"timezone": {
"timeZoneId": "America/Los_Angeles"
},
"lat": 47.701927,
"long": -117.475624,
"website": "https://www.va.gov/spokane-health-care/locations/mann-grandstaff-department-of-veterans-affairs-medical-center/",
"phone": {
"main": "509-434-7000",
"fax": "509-434-7100",
"pharmacy": "509-434-7011",
"afterHours": "509-434-7000",
"patientAdvocate": "509-434-7504",
"mentalHealthClinic": "1-509-434-7013",
"enrollmentCoordinator": "509-434-7506"
},
"hoursOfOperation": [
{
"daysOfWeek": "sun",
"openingTime": "24/7",
"closingTime": "24/7"
},
{
"daysOfWeek": "mon",
"openingTime": "24/7",
"closingTime": "24/7"
},
{
"daysOfWeek": "tue",
"openingTime": "24/7",
"closingTime": "24/7"
},
{
"daysOfWeek": "wed",
"openingTime": "24/7",
"closingTime": "24/7"
},
{
"daysOfWeek": "thu",
"openingTime": "24/7",
"closingTime": "24/7"
},
{
"daysOfWeek": "fri",
"openingTime": "24/7",
"closingTime": "24/7"
},
{
"daysOfWeek": "sat",
"openingTime": "24/7",
"closingTime": "24/7"
}
],
"physicalAddress": {
"type": "physical",
"line": [
"4815 North Assembly Street",
null,
null
],
"city": "Spokane",
"state": "WA",
"postalCode": "99205-6185"
},
"mobile": false,
"healthService": [
"Addiction",
"AdviceNurse",
"Audiology",
"Cardiology",
"CaregiverSupport",
"Chiropractic",
"ColonSurgery",
"ComplementaryHealth",
"Covid19Vaccine",
"CriticalCare",
"Dental",
"Dermatology",
"Diabetic",
"EmploymentPrograms",
"Gastroenterology",
"Geriatrics",
"Gynecology",
"Hematology",
"Homeless",
"Hospice",
"HospitalMedicine",
"Laboratory",
"Lgbtq",
"MilitarySexualTrauma",
"MinorityCare",
"MyHealtheVetCoordinator",
"Neurology",
"Nutrition",
"Ophthalmology",
"Optometry",
"Orthopedics",
"OutpatientSurgery",
"PatientAdvocates",
"Pharmacy",
"PhysicalTherapy",
"Podiatry",
"PrimaryCare",
"Prosthetics",
"Psychiatry",
"Ptsd",
"PulmonaryMedicine",
"Radiology",
"RegistryExams",
"Rehabilitation",
"Rheumatology",
"SleepMedicine",
"Smoking",
"SocialWork",
"SuicidePrevention",
"Surgery",
"Telehealth",
"ToxicExposureScreening",
"TransitionCounseling",
"TravelReimbursement",
"UrgentCare",
"Urology",
"Vision",
"WeightManagement",
"WholeHealth",
"WomensHealth",
"Wound"
],
"operatingStatus": {
"code": "NORMAL"
},
"visn": "20"
}
}
}
cc @simiadebowale
@jenniemc
Q: can vets-api collect the correct website URL?
A: for facility data, vets-api can only collect the website URLs returned to it from the get_facility calls, so if those links are what we are getting back, then I think that's what we have to work with. Since the two examples above point to different source systems, that's likely a factor in why the web links differ. I tested out both links and saw what you mean with the redirect on example 1, but it still seemed to point to a Dayton Health Care Center page with relevant facility info.
So I think my follow up question is, are we sure that the redirected link isn't correct? Let me know if there's any outstanding questions from any of this and if so I can reach out to some additional folks and do another round of digging if needed.
Since the two examples above point to different source systems, that's likely a factor in why the web links differ.
@cferris32 Thank you for confirming the appointment data are coming from different sources.
So I think my follow up question is, are we sure that the redirected link isn't correct?
If the website URL is pointing to a Dayton VAMC (https://www.dayton.va.gov/locations/directions.asp) then the redirect correctly lands on the Dayton VAMC page (https://www.va.gov/dayton-health-care/locations/) .
However the problem arises if the website URL is pointing to a CBOC; the redirect erroneously lands on the VAMC page not the clinic page.
In example 1 where the URL is "https://www.dayton.va.gov/locations/spgfld_cboc.asp" it redirects to the Dayton VAMC "https://www.va.gov/dayton-health-care/locations/" when it should go to the Springfield Clinic "https://www.va.gov/dayton-health-care/locations/springfield-va-clinic/"
Let me know if there's any outstanding questions from any of this and if so I can reach out to some additional folks and do another round of digging if needed.
Can you reach out to the facility folks to let them know they have outdated/old website url and requires updating?
We can get the facility website from the appointment response body at the location.website attribute.
"website": "https://www.dayton.va.gov/locations/spgfld_cboc.asp"
Because we are using test data in staging, the value returned for the website property is old and user will experience a redirect. The problem arises if the website URL is pointing to a CBOC; the redirect lands on the main VAMC page not on the clinic info page. Brad confirms production data has the correct website value and is coming from Lighthouse.
The conclusion is we need to test in the production environment if we are not able to get correct website values in staging. I suggest putting the facility website link behind a feature toggle flag so it can be turned on to test with Stephen Barrs or anyone who can log into production.
The other alternative is use of DataDog. @simiadebowale can you elaborate? I am experiencing brain fart because I can't remember the purpose of the data collection in this effort. :-)
cc: @cferris32
I have opened a ticket to log the website values in prod to confirm that we are getting the correct values. Ticket: https://app.zenhub.com/workspaces/appointments-team-603fdef281af6500110a1691/issues/gh/department-of-veterans-affairs/va.gov-team/91474
Request
Looking to implement the facility link on the appointment details page
Requirements to Consider
See details in #82919
Tasks
Time Box
_ hours
Definition of Done