eaglelandsonce commited on
Commit
da3de0a
1 Parent(s): 3d6b7f5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -111,7 +111,7 @@ def generate_breast_cancer_data(num_patients):
111
  treatment.append(treat)
112
 
113
  breast_cancer_data = {
114
- "Patient ID": primary_keys,
115
  "Age": ages,
116
  "Menopausal Status": menopausal_status,
117
  "Tumor Size (cm)": tumor_sizes,
@@ -134,8 +134,8 @@ def generate_breast_cancer_data(num_patients):
134
  # Function to generate Members from BreastCancer
135
  def generate_members_from_breast_cancer(breast_cancer_df):
136
  return pd.DataFrame({
137
- "MEMBER_ID": breast_cancer_df["Patient ID"],
138
- "PRIMARY_PERSON_KEY": breast_cancer_df["Patient ID"],
139
  "MEM_GENDER": ["F"] * len(breast_cancer_df),
140
  "MEM_ETHNICITY": np.random.choice(["Hispanic", "Non-Hispanic", None], len(breast_cancer_df)),
141
  "MEM_RACE": np.random.choice(["White", "Black", "Asian", None], len(breast_cancer_df)),
@@ -146,7 +146,7 @@ def generate_members_from_breast_cancer(breast_cancer_df):
146
  # Function to generate Enrollments from BreastCancer
147
  def generate_enrollments_from_breast_cancer(breast_cancer_df):
148
  return pd.DataFrame({
149
- "PRIMARY_PERSON_KEY": breast_cancer_df["Patient ID"],
150
  "MEM_STAT": np.random.choice(["ACTIVE", "INACTIVE"], len(breast_cancer_df)),
151
  "PAYER_LOB": np.random.choice(["MEDICAID", "COMMERCIAL", "MEDICARE"], len(breast_cancer_df)),
152
  "PAYER_TYPE": np.random.choice(["PPO", "HMO"], len(breast_cancer_df)),
@@ -177,7 +177,7 @@ if st.button("Generate Data"):
177
  breast_cancer_df = generate_breast_cancer_data(num_patients)
178
  members_df = generate_members_from_breast_cancer(breast_cancer_df)
179
  enrollments_df = generate_enrollments_from_breast_cancer(breast_cancer_df)
180
- services_df = generate_services(num_services, breast_cancer_df["Patient ID"].tolist())
181
 
182
  # Display and download data
183
  st.subheader("Breast Cancer Data")
 
111
  treatment.append(treat)
112
 
113
  breast_cancer_data = {
114
+ "PRIMARY_PERSON_KEY": primary_keys,
115
  "Age": ages,
116
  "Menopausal Status": menopausal_status,
117
  "Tumor Size (cm)": tumor_sizes,
 
134
  # Function to generate Members from BreastCancer
135
  def generate_members_from_breast_cancer(breast_cancer_df):
136
  return pd.DataFrame({
137
+ "MEMBER_ID": breast_cancer_df["PRIMARY_PERSON_KEY"],
138
+ "PRIMARY_PERSON_KEY": breast_cancer_df["PRIMARY_PERSON_KEY"],
139
  "MEM_GENDER": ["F"] * len(breast_cancer_df),
140
  "MEM_ETHNICITY": np.random.choice(["Hispanic", "Non-Hispanic", None], len(breast_cancer_df)),
141
  "MEM_RACE": np.random.choice(["White", "Black", "Asian", None], len(breast_cancer_df)),
 
146
  # Function to generate Enrollments from BreastCancer
147
  def generate_enrollments_from_breast_cancer(breast_cancer_df):
148
  return pd.DataFrame({
149
+ "PRIMARY_PERSON_KEY": breast_cancer_df["PRIMARY_PERSON_KEY"],
150
  "MEM_STAT": np.random.choice(["ACTIVE", "INACTIVE"], len(breast_cancer_df)),
151
  "PAYER_LOB": np.random.choice(["MEDICAID", "COMMERCIAL", "MEDICARE"], len(breast_cancer_df)),
152
  "PAYER_TYPE": np.random.choice(["PPO", "HMO"], len(breast_cancer_df)),
 
177
  breast_cancer_df = generate_breast_cancer_data(num_patients)
178
  members_df = generate_members_from_breast_cancer(breast_cancer_df)
179
  enrollments_df = generate_enrollments_from_breast_cancer(breast_cancer_df)
180
+ services_df = generate_services(num_services, breast_cancer_df["PRIMARY_PERSON_KEY"].tolist())
181
 
182
  # Display and download data
183
  st.subheader("Breast Cancer Data")