Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Streamlining user types in Qlik Cloud capacity-based subscriptions: Read the Details
cancel
Showing results for 
Search instead for 
Did you mean: 
Lauri
Specialist
Specialist

Assign random data to doctors for peer review

I need to take a list of medical providers (and their patients) and assign them somewhat randomly to one another so they can review each other's work. Each provider has 5 patients. Each provider needs to be assigned 2 of their own patients and 3 other providers' patients. A "Mid-Level" provider cannot review a "Physician" but a "Physician" can review a "Mid-Level."

Can you suggest a way to fill in the Reviewer column to meet the above requirements, preferably in the front-end table? I apply filters in the front-end depending on the user request, but I could probably make it work in the load editor.

Here's an example of the data (including "Randomizer" which is a field containing a random number generated during the load so that we get a random selection of 5 patients per provider). I've filled in "Reviewer" by hand to demonstrate the desired result. The true list is much longer.

Visit.ProviderPatientRandomizerProvider.TypeReviewer
AndersonA10.064147266Mid-LevelAnderson
AndersonA20.061851288Mid-LevelAnderson
AndersonA30.00959364Mid-LevelBond
AndersonA40.03211454Mid-LevelCarter
AndersonA50.056724438Mid-LevelDowd
BondA60.066972986Physician

Bond

BondA70.054674352PhysicianBond
BondA80.082194956PhysicianDowd
BondA90.084435145PhysicianDowd
BondA100.019081256PhysicianDowd
CarterA110.030338319Mid-LevelCarter
CarterA120.017411812Mid-LevelCarter
CarterA130.028957451Mid-LevelAnderson
CarterA140.043950889Mid-LevelBond
CarterA150.018507245Mid-LevelDowd
DowdA160.104712924PhysicianDowd
DowdA170.094580937PhysicianDowd
DowdA180.027340724PhysicianBond
DowdA190.075122733PhysicianBond
DowdA200.062509771PhysicianBond
Labels (2)
2 Replies
robert_mika
Master III
Master III

The easy way is to askGemini, You do not have to add your really data but just to get the way the code is created.

Lauri
Specialist
Specialist
Author

It was surprising to receive advice from a human, in a human-to-human user forum, to use AI to solve a problem. It was even more surprising to receive halfway decent advice from AI. But it went only halfway; the advice was relevant to the problem and gave me a method that may be a good start, but it did not address the most challenging (and important) parts of the problem. I ended up not using the AI advice. Still, if it continues to evolve, it some day will provide useful solutions and this forum will shut down.