How to look at multiple strings in one column
Hi, created a Case like below:
case
when `All File Dates` >= `EncounterDate` then 'Probable'
else 'Obtain Op Note'
end
This doesn't work to full capacity because the dates in the "All File Dates" column are in no real order. See below highlighted row. The output for Op note on file should say 'Probable' because the encounter date is less than 2022-08-04 but the case statement apparently is only reading the first date.
In ETL, I had converted the date range to text so I could group them together in 1 row.
Any idea how I can compare the encounter date to the all file dates column and have it look at all dates?
Answers
-
You can use a Group By tile in your ETL for each encounter date and location to get the min or max date instead of making it a comma separated list of strings. You can then compare to the maximum date instead of all the dates. You'll need to join your group back to your original dataset based on your grouping fields to put the date into your dataset for comparison.
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
So unfortunately, there could be multiple encounter dates for 1 patient. So if the encounter dates were 1/1/22, 3/3/22, and 5/4/22, then I would need each of those rows (each encounter on separate row) to look at all of the file received dates in the string to make the search work. Any other thoughts?
0 -
So are you just looking to see if the most recent file received date comes after the encounter date for each patient?
**Was this post helpful? Click Agree or Like below**
**Did this solve your problem? Accept it as a solution!**0 -
I wish it was that simple. There should be a file associated with each encounter, but to identify which encounter is missing the file, we need to compare the file received dates with the encounter dates. The raw dataset has the files listed individually per row with a patient ID key. I combined that data with my encounters data.
If there is an easier way to cross reference the file received dates as rows instead of grouping them, I would be willing to try that too.
0
Categories
- All Categories
- 1.8K Product Ideas
- 1.8K Ideas Exchange
- 1.6K Connect
- 1.2K Connectors
- 300 Workbench
- 6 Cloud Amplifier
- 9 Federated
- 2.9K Transform
- 102 SQL DataFlows
- 626 Datasets
- 2.2K Magic ETL
- 3.9K Visualize
- 2.5K Charting
- 754 Beast Mode
- 61 App Studio
- 41 Variables
- 693 Automate
- 178 Apps
- 456 APIs & Domo Developer
- 49 Workflows
- 10 DomoAI
- 38 Predict
- 16 Jupyter Workspaces
- 22 R & Python Tiles
- 398 Distribute
- 115 Domo Everywhere
- 276 Scheduled Reports
- 7 Software Integrations
- 130 Manage
- 127 Governance & Security
- 8 Domo Community Gallery
- 38 Product Releases
- 11 Domo University
- 5.4K Community Forums
- 40 Getting Started
- 30 Community Member Introductions
- 110 Community Announcements
- 4.8K Archive