Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
cnel
Frequent Visitor

Capturing Patient Visits

I am trying to capture patient visits to determine if they are compliant or not. There is a column [Visit Type], which includes Intial

Visit, Quarterly visit, Monthly visit, Annual Visit, Acute/follow up visit, Post Hospitaliztion visit.  I would like to return a column with a value "compliant" or "not-compliant" for each patient.  If a patient is not seen every month then they are considered not compliant, additionally if they don' have a quarterly visit every 3 months they are not compliant. Every 3 months there should be a Quarterly or possibly Annual visit and in between these there should be some combination of Monthly, Post Hospitalization, Acute/Follow up Visit. If the patient has an effective end date the result should be "discharged"

 

Any help would be greatly appreciated. 

 

pbi 2022-12-13 135716.png

9 REPLIES 9
cnel
Frequent Visitor

Expected output is a new table with the patient name and a new column (Evaluation) that returns a value of Discharged, Compliant, or Not Compliant. I have a sample visualization that I am working on but I cant get figure out the calculation to return the expected result

 

cnel_0-1671053490716.png

 

 

cnel
Frequent Visitor

Visit TypeGroup NumberEffective Begin DatePatient  NamePatient Birth DatePatient CodeNote DatePhysicianPatient DepartementEffective End Date
Initial Visit10010000272S7/1/2021Bill Nelson2/22/1974INS CHG1/4/2022Bob MarshalABC Company4/30/2022
Quarterly Visit10010000419S7/1/2021Paul Conner9/11/1948 3/5/2022Kim Blunt123 Company 
Annual Visit10010000353S1/9/2022Bonnie Thorn7/3/1936 8/2/2022

Henry

Clark

ABC Company 
Acute/Follow Up Visit10010438139S1/1/2022

Mindy

Jenkins

8/20/1951 5/5/2022

Henry Clark

ABC Compnay9/28/2022
Monthly Visit10010000419S2/15/2022

Hope

Walker

7/9/1981INS CHG10/1/2022

Mary Beth

123 Company 
Post Hospitalization Visit10010028210S7/4/2022

Cindy

Stewart

11/21/1952 6/4/2022

Cheryl Holder

ABC Company 
Quarterly Visit10010028210S7/4/2022

Cindy

Stewart

11/21/1952 7/24/2022

Cheryl Holder

ABC Company 

 

I think sample data is not enough.

if you have different scenarios, you need to provide the data for all scenarios.

hope i didn't misunderstand your question.

e.g

TOM 2022/1/1, 2022/2/1,2022/3/1

Jack 2022/1/1, 2022/4/1, 2022/7,1

Peter, 2022/1/1,2023/1/1

Linda 2022/1/1,2022/2/1,2022/6/1

we have monthly visit, quarterly visit, yearly visit and other scenario, the output for XXX is YYY

something like that

 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




ryan_mayu
Super User
Super User

could you pls provde the sample data(not the screenshot) and the expected output





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




I added the expected output above and included a screenshot of what I was working on. Does this give you enough information to go on @ryan_mayu ? 

what's the expected output based on the sample data you provided?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




I am hoping to have either a measure or a calculated column the returns "Compliant", Not-compliant", or "Discharged" regarding each patient visit row. 

 

The criteria for compliance:

- Patients needs to be seen at least once a month (regardless of visit type). If there are any months were a patient doesn't have a visit they are Non-compliant. 

- Patient need to record a Quarterly or Annual visit once every three months. If there are no quarterly or annual visits in a three month span they are also Not-compliant.

 

- If an empolyee has an Effective End Date entry they are designated Discharged

 

I hope this makes sense.

 

based on the sample data, two patients have end date, so the output is discharged. only cindy has two records and visit monthly, so we mark her as monthly visit, the rest leave blank, is that what you want?

1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




Hi Ryan, The discharge output is correct. The "monthly" output is not correct. Monthly is a visit type.  The only 3 output categories would be Compliant, Not-compliant, or Discharged. If a patient had months were they were not seen then they would be not compliant. If a patient didn't have a a quarterly or annual visit every three months then they would be not-compliant.  This might be better to do as a measure instead of calc column. Most patients have multiple rows for each of their visit types on the respective dates. I essentially want to evaluate all of there dates and visit types and determine compliant, not compliant or discharched.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.