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.7K Product Ideas
- 1.7K Ideas Exchange
- 1.5K Connect
- 1.2K Connectors
- 292 Workbench
- 4 Cloud Amplifier
- 8 Federated
- 2.8K Transform
- 95 SQL DataFlows
- 602 Datasets
- 2.1K Magic ETL
- 3.7K Visualize
- 2.4K Charting
- 695 Beast Mode
- 43 App Studio
- 39 Variables
- 658 Automate
- 170 Apps
- 441 APIs & Domo Developer
- 42 Workflows
- 5 DomoAI
- 32 Predict
- 12 Jupyter Workspaces
- 20 R & Python Tiles
- 386 Distribute
- 111 Domo Everywhere
- 269 Scheduled Reports
- 6 Software Integrations
- 113 Manage
- 110 Governance & Security
- 8 Domo University
- 30 Product Releases
- Community Forums
- 39 Getting Started
- 29 Community Member Introductions
- 98 Community Announcements
- Domo Community Gallery
- 4.8K Archive