Stronger Correlation between Data Sets

Here is the scenario -
l have a Patient dataset and a Provider dataset. Both datasets are generated from schemas that have a State column. I would like to add a Preferred Provider column to the Patient schema, that populates a provider name from the Provider Dataset - the caveat is instead of being random, I would like to populate the a provider whose state matches the patient state. Is there a way to do this ?

Hi @mukundan.agaram
One option is to do a join and treat the State as a shared key, for example:
from_dataset("Provider","Provider_Name",schema_State_field_name:dataset_State_field_name)
It should pick a random value from the matches. See here Can I lookup a value in one dataset using a field in another? for more details of this functionality.

Hi @mp_np

I tried the approach and I am getting this error

Error evaluating from_dataset(“TristatesAndAffiliateProviders”, “name”, “{“state”:“MN”}”): undefined method `lists’ for nil:NilClass

Hi @mp_np,

I got it to work. I needed to use from_dataset() with just plain Formula instead of DatasetColumn with Formula. That seemed to do the trick.

I have followed each and everything now I was able to resolve it.
routerlogin

We have followed each and everything now. We were able to resolve it UX Design Company Surat

We were able to resolve it thanks to visit website