Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Todd_D
Contributor II
Contributor II

Lookup? Loop? Applymap? Match? Generic Load? Crosstable? Not sure how to do this or even where to start.

I am clueless as to how to go about this.  In short, I need to determine if a patient's primary office is one that their doctor has worked at.

Here is more detail:

On any given patient's profile there is a primary office and doctor.  They are both one to one relationships.  The two fields are independent of each other.  I have a list of the doctor's with all of the offices they have worked at.  Some have worked at more than one, some split their time between offices.  I am trying to take the doctor's name from the patient's profile, look it up in the list of doctors, and check that the office in the patient's profile is one in the list, i.e. check that the doctor has in fact worked at that office.

Examples:

Patient A is assigned to Dr. Smith and the Chicago office.  The list of doctor's says Dr. Smith has worked at the New York office and the LA office.  In this case, I would want a flag that says the Doctor has never worked at the office on their profile.

Patient B is assigned to Dr John and the Seattle office.  The list of doctor's has Dr John currently at the New York Office and previously at the Seattle office.  In this case, I would want a flag that says the office on the patient's profile is a location the doctor has worked at.

I am not even sure where to start.

Labels (1)
1 Reply
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

I'm think there are multiple ways to approach this,  but here is one that in my mind is pretty straight-forward.

Doctors:
LOAD Doctor & '|' & Office as DoctorOfficeKey
...From...or Resident...

Patients:
LOAD
  *,
  -Exists(DoctorOfficeKey, Doctor & '|' & Office) as DoctorOfficeMatch
...From...

-Rob
http://www.easyqlik.com
http://masterssummit.com
http://qlikviewcookbook.com