@cash_moonshine wrote:
Essentially, each row is a patient who could have any number of the 31 I10_PR codes. I have imported a data set and created a format from it; this data set is a list of ICD10 codes and a label: Red, Blue, Green, or Yellow. What I want is for the do loop to go through the second, patient data set and if any PR code is present for that patient, give a value of 1 to Red, Green, Blue, or Yellow depending on if that code is associated with any of those color labels.
So if there is a PR code present while the do loop for Red is running, it should give a value of 1 to red when it sees the code and the $source_color label from the format that I created.
Instead, it skips Red, leaves it as 0, and give Green a value of 1 when the Green do loop is running.
I need it to give values of 1 to each color label any time a code is present for one of those labels.
Ultimately, I need to know which color label is contributing the most codes to the final patient data set.
I have worked occasionally with ICD-10 and ICD-9 codes before that. Your presentation of values is so far off what I have seen, including multiple questions on the forum with different "coding" for ICD values that it never occurred to me that they might be ICD codes at all.
... View more