I have a list of patients and I filtered only those patients that have at least one of to different codes coded on a record. these codes have a date associated with them. For each of the patients in the filtered list, I need to make sure that the earliest date/entry of one of these codes matches a specific one of the codes and not the other.
Any help would be greatly appreciated.
Note: I cannot share the data as an example as it is sensitive.
Can you mock up a example input and desired output? It would help enormously with understanding your query.
User | Count |
---|---|
106 | |
82 | |
72 | |
54 | |
40 |