Advertisement
Guest User

Rules Engine 3/8/2021

a guest
Mar 7th, 2021
227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
JSON 11.28 KB | None | 0 0
  1. {
  2.     "conditions": {
  3.       "any": [{
  4.         "all": [{
  5.           "fact": "stateCode",
  6.           "operator": "equal",
  7.           "value": "NY"
  8.         }, {
  9.           "fact": "age",
  10.           "operator": "greaterThanInclusive",
  11.           "value": "65"
  12.         }]
  13.       }, {
  14.         "all": [{
  15.           "fact": "stateCode",
  16.           "operator": "equal",
  17.           "value": "NY"
  18.         }, {
  19.           "fact": "age",
  20.           "operator": "greaterThanInclusive",
  21.           "value": "18"
  22.         }, {
  23.           "fact": "occupationCode",
  24.           "operator": "in",
  25.           "value": ["Childcare Worker", "Family Childcare Providers", "Head Start and Early Head Start", "Pre-Kindergarten -12th grade Educator & Staff"]
  26.         }]
  27.       }, {
  28.         "all": [{
  29.           "fact": "stateCode",
  30.           "operator": "equal",
  31.           "value": "DE"
  32.         }, {
  33.           "fact": "age",
  34.           "operator": "greaterThanInclusive",
  35.           "value": "65"
  36.         }]
  37.       }, {
  38.         "all": [{
  39.           "fact": "stateCode",
  40.           "operator": "equal",
  41.           "value": "DE"
  42.         }, {
  43.           "fact": "age",
  44.           "operator": "greaterThanInclusive",
  45.           "value": "18"
  46.         }, {
  47.           "fact": "occupationCode",
  48.           "operator": "in",
  49.           "value": ["Health Care Worker", "Long Term Care Facility Staff", "Public Health Employee", "Pharmacy Staff"]
  50.         }]
  51.       }, {
  52.         "all": [{
  53.           "fact": "stateCode",
  54.           "operator": "equal",
  55.           "value": "CA"
  56.         }, {
  57.           "fact": "age",
  58.           "operator": "greaterThanInclusive",
  59.           "value": "65"
  60.         }]
  61.       }, {
  62.         "all": [{
  63.           "fact": "stateCode",
  64.           "operator": "equal",
  65.           "value": "CA"
  66.         }, {
  67.           "fact": "age",
  68.           "operator": "greaterThanInclusive",
  69.           "value": "18"
  70.         }, {
  71.           "fact": "occupationCode",
  72.           "operator": "in",
  73.           "value": ["Food and Agricultural Workers", "Health Care Worker", "Long Term Care Facility Staff", "Public Health Employee", "Pharmacy Staff", "Pre-Kindergarten -12th grade Educator & Staff", "Head Start and Early Head Start", "Childcare Workers", "Family Childcare Providers" ]
  74.         }]
  75.       }, {
  76.         "all": [{
  77.           "fact": "stateCode",
  78.           "operator": "equal",
  79.           "value": "MI"
  80.         }, {
  81.           "fact": "age",
  82.           "operator": "greaterThanInclusive",
  83.           "value": "50"
  84.         }]
  85.       }, {
  86.         "all": [{
  87.           "fact": "stateCode",
  88.           "operator": "equal",
  89.           "value": "MI"
  90.         }, {
  91.           "fact": "age",
  92.           "operator": "greaterThanInclusive",
  93.           "value": "18"
  94.         }, {
  95.           "fact": "occupationCode",
  96.           "operator": "in",
  97.           "value": ["Health Care Worker", "Long Term Care Facility Staff", "Pharmacy Staff", "Childcare Workers", "Family Childcare Providers", "Head Start and Early Head Start", "Pre-Kindergarten -12th grade Educator & Staff" ]
  98.         }]
  99.       }, {
  100.         "all": [{
  101.           "fact": "stateCode",
  102.           "operator": "equal",
  103.           "value": "PA"
  104.         }, {
  105.           "fact": "age",
  106.           "operator": "greaterThanInclusive",
  107.           "value": "65"
  108.         },
  109.         {
  110.           "fact": "city",
  111.           "operator": "notIn",
  112.           "value": ["Philadelphia", "philadelphia", "PHILADELPHIA","Philly","PHILLY","philly"]
  113.         }]
  114.       },{
  115.         "all": [{
  116.           "fact": "stateCode",
  117.           "operator": "equal",
  118.           "value": "PA"
  119.         }, {
  120.           "fact": "age",
  121.           "operator": "greaterThanInclusive",
  122.           "value": "75"
  123.         },
  124.         {
  125.           "fact": "city",
  126.           "operator": "in",
  127.           "value": ["Philadelphia", "philadelphia", "PHILADELPHIA","Philly","PHILLY","philly"]
  128.         }]
  129.       }, {
  130.         "all": [{
  131.           "fact": "stateCode",
  132.           "operator": "equal",
  133.           "value": "PA"
  134.         }, {
  135.           "fact": "age",
  136.           "operator": "greaterThanInclusive",
  137.           "value": "18"
  138.         },  {
  139.           "fact": "occupationCode",
  140.           "operator": "in",
  141.           "value": ["Childcare Workers", "Family Childcare Providers", "Head Start and Early Head Start", "Pre-Kindergarten -12th grade Educator & Staff"]
  142.         },
  143.         {
  144.           "fact": "city",
  145.           "operator": "in",
  146.           "value": ["Philadelphia", "philadelphia", "PHILADELPHIA","Philly","PHILLY","philly"]
  147.         }]
  148.       }, {
  149.         "all": [{
  150.           "fact": "stateCode",
  151.           "operator": "equal",
  152.           "value": "PA"
  153.         }, {
  154.           "fact": "age",
  155.           "operator": "greaterThanInclusive",
  156.           "value": "18"
  157.         }, {
  158.           "fact": "occupationCode",
  159.           "operator": "in",
  160.           "value": ["Health Care Worker", "Long Term Care Facility Staff", "Public Health Employee", "Pharmacy Staff", "Emergency Medical Services (EMS)", "Childcare Workers", "Family Childcare Providers", "Head Start and Early Head Start", "Pre-Kindergarten -12th grade Educator & Staff"]
  161.         },     
  162.         {
  163.           "fact": "city",
  164.           "operator": "notIn",
  165.           "value": ["Philadelphia", "philadelphia", "PHILADELPHIA","Philly","PHILLY","philly"]
  166.         }]
  167.       }, {
  168.         "all": [{
  169.           "fact": "stateCode",
  170.           "operator": "equal",
  171.           "value": "PA"
  172.         }, {
  173.           "fact": "age",
  174.           "operator": "greaterThanInclusive",
  175.           "value": "18"
  176.         }, {
  177.           "fact": "medicalConditionCode",
  178.           "operator": "in",
  179.           "value": ["Obesity", "Diabetes", "Heart Condition", "Sickle Cell Anemia", "Smoking", "Organ transplant", "Kidney Disease", "COPD", "Cancer", "Down Syndrome", "HIV", "Weakened Immune System", "Pregnancy"]
  180.         },
  181.         {
  182.           "fact": "city",
  183.           "operator": "notIn",
  184.           "value": ["Philadelphia", "philadelphia", "PHILADELPHIA","Philly","PHILLY","philly"]
  185.         }]
  186.       }, {
  187.         "all": [{
  188.           "fact": "stateCode",
  189.           "operator": "equal",
  190.           "value": "NJ"
  191.         }, {
  192.           "fact": "age",
  193.           "operator": "greaterThanInclusive",
  194.           "value": "65"
  195.         }]
  196.       },
  197.       {
  198.         "all": [{
  199.           "fact": "stateCode",
  200.           "operator": "equal",
  201.           "value": "NJ"
  202.         }, {
  203.           "fact": "age",
  204.           "operator": "greaterThanInclusive",
  205.           "value": "18"
  206.         }, {
  207.           "fact": "medicalConditionCode",
  208.           "operator": "in",
  209.           "value": ["Obesity", "Diabetes", "Heart Condition", "Sickle Cell Anemia", "Smoking", "Organ transplant", "Kidney Disease", "COPD", "Cancer", "Down Syndrome","Pregnancy","Weakened Immune System"]
  210.         }]
  211.       },
  212.       {
  213.         "all": [{
  214.           "fact": "stateCode",
  215.           "operator": "equal",
  216.           "value": "NJ"
  217.         }, {
  218.           "fact": "age",
  219.           "operator": "greaterThanInclusive",
  220.           "value": "18"
  221.         }, {
  222.           "fact": "occupationCode",
  223.           "operator": "in",
  224.           "value": ["Health Care Worker", "Long Term Care Facility Staff", "Public Health Employee", "Pharmacy Staff", "Emergency Medical Services (EMS)", "Correctional Officers", "First Responder", "Law Enforcement", "Childcare Worker", "Family Childcare Providers", "Head Start and Early Head Start", "Pre-Kindergarten -12th grade Educator & Staff"]
  225.         }]
  226.       },
  227.       {
  228.         "all": [{
  229.           "fact": "stateCode",
  230.           "operator": "equal",
  231.           "value": "OH"
  232.         }, {
  233.           "fact": "age",
  234.           "operator": "greaterThanInclusive",
  235.           "value": "18"
  236.         }, {
  237.           "fact": "medicalConditionCode",
  238.           "operator": "in",
  239.           "value": ["Amyotrophic Lateral Asclerosis (ALS)","Asthma-with hospitalization", "Bone Marrow Transplant","Cerebral Palsy","Cystic Fibrosis","Diabetes","Down Syndrome","Epilepsy","Heart Condition","Metabolic Disorders","Muscular Dystrophy","Organ transplant","Pregnancy","Severe Genetic Disorders","Sickle Cell anemia", "Spina Bifida"]
  240.         }]
  241.       }, {
  242.         "all": [{
  243.           "fact": "stateCode",
  244.           "operator": "equal",
  245.           "value": "OH"
  246.         }, {
  247.           "fact": "age",
  248.           "operator": "greaterThanInclusive",
  249.           "value": "60"
  250.         }]
  251.       } , {
  252.         "all": [{
  253.           "fact": "stateCode",
  254.           "operator": "equal",
  255.           "value": "OH"
  256.         }, {
  257.           "fact": "age",
  258.           "operator": "greaterThanInclusive",
  259.           "value": "18"
  260.         }, {
  261.           "fact": "occupationCode",
  262.           "operator": "in",
  263.           "value": ["Childcare Workers" , "Correctional Officers" , "Funeral Services" , "Law Enforcement", "Family Childcare Providers", "Head Start and Early Head Start", "Pre-Kindergarten -12th grade Educator & Staff"]
  264.         }]
  265.       }, {
  266.         "all": [{
  267.           "fact": "stateCode",
  268.           "operator": "equal",
  269.           "value": "OR"
  270.         }, {
  271.           "fact": "age",
  272.           "operator": "greaterThanInclusive",
  273.           "value": "65"
  274.         }]
  275.       },
  276.       {
  277.         "all": [{
  278.           "fact": "stateCode",
  279.           "operator": "equal",
  280.           "value": "OR"
  281.         }, {
  282.           "fact": "age",
  283.           "operator": "greaterThanInclusive",
  284.           "value": "18"
  285.         }, {
  286.           "fact": "occupationCode",
  287.           "operator": "in",
  288.           "value": ["Childcare Workers" , "Pre-Kindergarten -12th grade Educator & Staff"]
  289.         }]
  290.       },
  291.       {
  292.         "all": [{
  293.           "fact": "stateCode",
  294.           "operator": "equal",
  295.           "value": "MD"
  296.         }, {
  297.           "fact": "age",
  298.           "operator": "greaterThanInclusive",
  299.           "value": "65"
  300.         }]
  301.       },
  302.       {"all": [{
  303.           "fact": "stateCode",
  304.           "operator": "equal",
  305.           "value": "MD"
  306.         }, {
  307.           "fact": "age",
  308.           "operator": "greaterThanInclusive",
  309.           "value": "18"
  310.         }, {
  311.           "fact": "occupationCode",
  312.           "operator": "in",
  313.           "value": ["Essential Worker", "Health Care Worker", "Pre-Kindergarten -12th grade Educator & Staff", "Long Term Care Facility Staff", "Pharmacy Staff", "First Responder", "Law Enforcement", "Correctional Officers" , "Public Safety Workers", "Childcare Workers", "Emergency Medical Services (EMS)", "Food and Agricultural Workers", "Grocery Workers", "Public Transit Workers"]
  314.         }]
  315.       },
  316.       {
  317.         "all": [{
  318.           "fact": "stateCode",
  319.           "operator": "equal",
  320.           "value": "MD"
  321.         }, {
  322.           "fact": "age",
  323.           "operator": "greaterThanInclusive",
  324.           "value": "18"
  325.         }, {
  326.           "fact": "medicalConditionCode",
  327.           "operator": "in",
  328.           "value": ["Intellectual and Developmental Disabilities"]
  329.         }]
  330.       },
  331.        {
  332.         "all": [{
  333.           "fact": "stateCode",
  334.           "operator": "equal",
  335.           "value": "VA"
  336.         }, {
  337.           "fact": "age",
  338.           "operator": "greaterThanInclusive",
  339.           "value": "65"
  340.         }]
  341.       },
  342.       {"all": [{
  343.           "fact": "stateCode",
  344.           "operator": "equal",
  345.           "value": "VA"
  346.         }, {
  347.           "fact": "age",
  348.           "operator": "greaterThanInclusive",
  349.           "value": "18"
  350.         }, {
  351.           "fact": "occupationCode",
  352.           "operator": "in",
  353.           "value": ["Essential Worker", "Health Care Worker", "Pre-Kindergarten -12th grade Educator & Staff", "Long Term Care Facility Staff", "Pharmacy Staff", "First Responder", "Law Enforcement", "Correctional Officers" , "Public Safety Workers"]
  354.         }]
  355.       },
  356.  
  357.       {
  358.         "all": [{
  359.           "fact": "stateCode",
  360.           "operator": "equal",
  361.           "value": "VA"
  362.         }, {
  363.           "fact": "age",
  364.           "operator": "greaterThanInclusive",
  365.           "value": "18"
  366.         }, {
  367.           "fact": "medicalConditionCode",
  368.           "operator": "in",
  369.           "value": ["Obesity", "Diabetes", "Heart Condition", "Sickle Cell Anemia", "Smoking", "Organ transplant", "Kidney Disease", "COPD", "Cancer", "Down Syndrome", "HIV", "Weakened Immune System", "Pregnancy"]
  370.         }]
  371.       },
  372.       {
  373.         "all": [{
  374.           "fact": "stateCode",
  375.           "operator": "equal",
  376.           "value": "WA"
  377.         }, {
  378.           "fact": "age",
  379.           "operator": "greaterThanInclusive",
  380.           "value": "65"
  381.         }]
  382.       },
  383.       {"all": [{
  384.           "fact": "stateCode",
  385.           "operator": "equal",
  386.           "value": "WA"
  387.         }, {
  388.           "fact": "age",
  389.           "operator": "greaterThanInclusive",
  390.           "value": "50"
  391.         }, {
  392.           "fact": "occupationCode",
  393.           "operator": "in",
  394.           "value": ["Multigenerational Household"]
  395.         }]
  396.       },
  397.       {
  398.         "all": [{
  399.           "fact": "stateCode",
  400.           "operator": "equal",
  401.           "value": "WA"
  402.         }, {
  403.           "fact": "age",
  404.           "operator": "greaterThanInclusive",
  405.           "value": "18"
  406.         }, {
  407.           "fact": "occupationCode",
  408.           "operator": "in",
  409.           "value": ["Health Care Worker","Pharmacy Staff", "First Responder","Emergency Medical Services (EMS)","Long Term Care Facility Staff","Public Health Employee", "Childcare Workers", "Family Childcare Providers", "Head Start and Early Head Start ", "Pre-Kindergarten -12th grade Educator & Staff"]
  410.         }]
  411.       }
  412.      
  413.       ]
  414.     },
  415.     "event": {  
  416.       "type": "qualifiedUser",
  417.       "params": {
  418.         "message": "You qualified for vaccine!"
  419.       }
  420.     }
  421. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement