// version 16.1 include project_paths.do use "`tmp_dir'/tasks_w_sessionids_devicetype_selen", clear gen act_active = . la var act_active "marker for an active task" gen act_mca_activity = "" la var act_mca_activity "indicator for MyChart Ambulatory activity" gen act_mca_activity_group = "" la var act_mca_activity_group "indicator for MyChart Ambulatory menu" replace act_mca_activity = "billing account details" if act_type == "Account Details" replace act_mca_activity = "billing account summary" if act_type == "Account Inquiry" replace act_mca_activity = "bill payment" if act_type == "Account Payment" replace act_mca_activity = "miscellanea" if act_type == "Account ReEnable" replace act_mca_activity = "appointment details" if act_type == "Add To Calendar" replace act_mca_activity = "about me" if act_type == "Address Change Request" replace act_mca_activity = "" if act_type == "Advanced Care Planning" replace act_mca_activity = "consolidate EHR" if act_type == "Alerts Retrieved from Remote System" replace act_mca_activity = "allergies" if act_type == "Allergies" replace act_mca_activity = "cancel an appointment" if act_type == "Appointment Cancel" replace act_mca_activity = "echeck in" if act_type == "Appointment Confirm" replace act_mca_activity = "cancel an appointment" if act_type == "Appointment Direct Cancel" replace act_mca_activity = "schedule an appointment" if act_type == "Appointment Request" replace act_mca_activity = "schedule an appointment" if act_type == "Appointment Request" & ext_info == "cancel" replace act_mca_activity = "who accessed my record" if act_type == "Audit Trail" replace act_mca_activity = "change paperless status" if act_type == "Change Paperless Status" replace act_mca_activity = "security settings" if act_type == "Change Password" replace act_mca_activity = "proxy forms" if act_type == "Community Authorization" replace act_mca_activity = "proxy forms" if act_type == "Community Link Validation Failure" replace act_mca_activity = "proxy forms" if act_type == "Community Link Validation Success" replace act_mca_activity = "proxy forms" if act_type == "Community Management" replace act_mca_activity = "proxy forms" if act_type == "Community Terms and Conditions" replace act_mca_activity = "insurance summary" if act_type == "Coverage View" replace act_mca_activity = "consolidate EHR" if act_type == "Create External Link" replace act_mca_activity = "preventive care" if act_type == "Custom Configured Report" replace act_mca_activity = "upcoming tests" if act_type == "Custom Configured Report" & ext_info == "submode^upcomingorders" replace act_mca_activity = "send new message" if act_type == "Customer Service Request" replace act_mca_activity = "miscellanea" if act_type == "Device - Add" replace act_mca_activity = "miscellanea" if act_type == "Device - Auth" replace act_mca_activity = "miscellanea" if act_type == "Device - List" replace act_mca_activity = "miscellanea" if act_type == "Device - Remove All" replace act_mca_activity = "miscellanea" if act_type == "Device - Remove" replace act_mca_activity = "schedule an appointment" if act_type == "Direct Scheduling Process" replace act_mca_activity = "schedule an appointment" if act_type == "Direct Scheduling Process" & ext_info == "appointment scheduled" replace act_mca_activity = "download my record" if act_type == "Download Requested ROI Record" replace act_mca_activity = "appointment details" if act_type == "Download Visit Summary" replace act_mca_activity = "driving directions" if act_type == "Driving Directions" replace act_mca_activity = "echeck in" if act_type == "eCheck-In" replace act_mca_activity = "appointment details" if act_type == "Encounter Details" replace act_mca_activity = "telemedicine" if act_type == "EVisit" replace act_mca_activity = "" if act_type == "Form - Medical Record" replace act_mca_activity = "" if act_type == "Full External Jump" replace act_mca_activity = "share my record" if act_type == "Generated Share Everywhere Token" replace act_mca_activity = "widget" if act_type == "Goals" replace act_mca_activity = "billing account summary" if act_type == "HB Account Details" replace act_mca_activity = "billing account summary" if act_type == "HB/SBO Auto Pay Signup" replace act_mca_activity = "billing account summary" if act_type == "HB/SBO Auto Pay Update" replace act_mca_activity = "" if act_type == "Health Maintenance - Mark As Complete" replace act_mca_activity = "widget" if act_type == "Health Maintenance" replace act_mca_activity = "health summary" if act_type == "Health Summary" replace act_mca_activity = "echeck in" if act_type == "History Questionnaire" replace act_mca_activity = "billing account summary" if act_type == "Hospital Statement Details" replace act_mca_activity = "immunizations" if act_type == "Immunizations" replace act_mca_activity = "" if act_type == "Inline External Jump" replace act_mca_activity = "appointment details" if act_type == "Inpatient Admissions" replace act_mca_activity = "widget" if act_type == "Inpatient Admissions" & ext_info == "list" replace act_mca_activity = "widget" if act_type == "Inpatient Admissions" & ext_info == "load-past-admissions-list" replace act_mca_activity = "insurance summary" if act_type == "Insurance ID Card" replace act_mca_activity = "insurance summary" if act_type == "Insurance" replace act_mca_activity = "consolidate EHR" if act_type == "Jump to External System" replace act_mca_activity = "" if act_type == "L&D Pre-Admission Accessed" replace act_mca_activity = "letters" if act_type == "Letters" replace act_mca_activity = "miscellanea" if act_type == "Log In From External System" replace act_mca_activity = "miscellanea" if act_type == "Login" replace act_mca_activity = "miscellanea" if act_type == "Logout" replace act_mca_activity = "send new message" if act_type == "Medical Advice Request" replace act_mca_activity = "send new message" if act_type == "Medical Advice Request" & regexm(ext_info, "new test result message$") replace act_mca_activity = "send new message" if act_type == "Medical Advice Request" & regexm(ext_info, "through new msg$") replace act_mca_activity = "send new message" if act_type == "Medical Advice Request" & ext_info == "new msg" replace act_mca_activity = "widget" if act_type == "Medical Histories" replace act_mca_activity = "medications" if act_type == "Medication Renewal Request" replace act_mca_activity = "medications" if act_type == "Medications" replace act_mca_activity = "medications" if act_type == "Medications" & ext_info == "medications loaded" replace act_mca_activity = "message center" if act_type == "Messaging" replace act_mca_activity = "message center" if act_type == "Messaging" & regexm(ext_info, "^[0-9]+") replace act_mca_activity = "message center" if act_type == "Messaging" & regexm(ext_info, "^check reply") replace act_mca_activity = "message center" if act_type == "Messaging" & regexm(ext_info, "^delete messages") replace act_mca_activity = "message center" if act_type == "Messaging" & regexm(ext_info, "message read$") replace act_mca_activity = "send new message" if act_type == "Messaging" & regexm(ext_info, "reply to") replace act_mca_activity = "message center" if act_type == "Messaging" & ext_info == "read" replace act_mca_activity = "message center" if act_type == "Messaging" & ext_info == "view message attachment" replace act_mca_activity = "my conditions" if act_type == "My Conditions" replace act_mca_activity = "notifications" if act_type == "Notification Preferences" replace act_mca_activity = "schedule an appointment" if act_type == "Open Scheduling (Internal)" replace act_mca_activity = "bill payment" if act_type == "Other" replace act_mca_activity = "request proxy access" if act_type == "Other" & ext_info == "new msg" replace act_mca_activity = "" if act_type == "Other" & ext_info == "null" replace act_mca_activity = "" if act_type == "Other" & ext_info == "update statement viewed status" replace act_mca_activity = "security settings" if act_type == "Password Reset Question Answer" replace act_mca_activity = "flowsheet" if act_type == "Patient Entered Flowsheet" replace act_mca_activity = "estimates" if act_type == "Patient Estimates - Create Estimate" replace act_mca_activity = "estimates" if act_type == "Patient Estimates - Estimate Details" replace act_mca_activity = "estimates" if act_type == "Patient Estimates - Estimate List" replace act_mca_activity = "echeck in" if act_type == "Patient Initiated Questionnaires" replace act_mca_activity = "" if act_type == "Patient Notes" replace act_mca_activity = "medications" if act_type == "Pharmacies" replace act_mca_activity = "medications" if act_type == "Pharmacies" & ext_info == "get pharmacies~success" replace act_mca_activity = "schedule an appointment" if act_type == "Preventative Care Scheduling" replace act_mca_activity = "schedule an appointment" if act_type == "Preventative Care Scheduling" & ext_info == "new msg" replace act_mca_activity = "current health issues" if act_type == "Problem List" replace act_mca_activity = "" if act_type == "Procedures" replace act_mca_activity = "widget" if act_type == "Provider List Widget" replace act_mca_activity = "personalize" if act_type == "Proxy Access (View)" replace act_mca_activity = "switch proxy context" if act_type == "Proxy Context Enter" replace act_mca_activity = "switch proxy context" if act_type == "Proxy Context Exit" replace act_mca_activity = "echeck in" if act_type == "Questionnaire" replace act_mca_activity = "billing account summary" if act_type == "Recent Payments" replace act_mca_activity = "consolidate EHR" if act_type == "Remote Chart Information" replace act_mca_activity = "consolidate EHR" if act_type == "Remove External Link" replace act_mca_activity = "research studies" if act_type == "Research Studies" replace act_mca_activity = "schedule an appointment" if act_type == "Respond To Appointment Offer" replace act_mca_activity = "test results" if act_type == "Result Component Graphing" replace act_mca_activity = "notifications" if act_type == "Scheduling and Other Preferences" replace act_mca_activity = "miscellanea" if act_type == "Secondary Identity Validation" replace act_mca_activity = "miscellanea" if act_type == "Send Document to PHR" replace act_mca_activity = "switch proxy context" if act_type == "Switch Proxy Context" replace act_mca_activity = "telemedicine" if act_type == "Telemedicine Connect" replace act_mca_activity = "telemedicine" if act_type == "Telemedicine Disconnect" replace act_mca_activity = "telemedicine" if act_type == "Telemedicine Hardware Test" replace act_mca_activity = "telemedicine" if act_type == "Telemedicine Initialize" replace act_mca_activity = "telemedicine" if act_type == "Telemedicine Streaming Status Change" replace act_mca_activity = "" if act_type == "Terms and Conditions" & ext_info == "accept" replace act_mca_activity = "" if act_type == "Terms and Conditions" & ext_info == "decline" replace act_mca_activity = "what is proxy access" if act_type == "Terms and Conditions" & ext_info == "iphone: view" replace act_mca_activity = "terms and conditions" if act_type == "Terms and Conditions" & ext_info == "iphone:" replace act_mca_activity = "terms and conditions" if act_type == "Terms and Conditions" & ext_info == "null" replace act_mca_activity = "what is proxy access" if act_type == "Terms and Conditions" & ext_info == "view" replace act_mca_activity = "test results" if act_type == "Test Result Details" replace act_mca_activity = "test results" if act_type == "Test Results List" replace act_mca_activity = "" if act_type == "Transmit Visit Summary" replace act_mca_activity = "schedule an appointment" if act_type == "Upcoming Appointment Details" replace act_mca_activity = "widget" if act_type == "Upcoming Orders" replace act_mca_activity = "allergies" if act_type == "Update Allergies" replace act_mca_activity = "update insurance" if act_type == "Update Insurance" replace act_mca_activity = "medications" if act_type == "Update Medications" replace act_mca_activity = "schedule an appointment" if act_type == "Update Wait List" replace act_mca_activity = "" if act_type == "View CE Authorization" replace act_mca_activity = "" if act_type == "View Education Title" replace act_mca_activity = "" if act_type == "View Patient Note To Self" replace act_mca_activity = "download my record" if act_type == "View Requested ROI Records" replace act_mca_activity = "test results" if act_type == "View Scan" replace act_mca_activity = "appointment details" if act_type == "View Visit Summary" replace act_mca_activity = "consolidate EHR" if act_type == "View/Download Lucy CCD" replace act_mca_activity = "billing account summary" if act_type == "Visit Payments" replace act_mca_activity = "appointment details" if act_type == "Visits" & ext_info == "appointments-list~success" replace act_mca_activity = "appointment details" if act_type == "Visits" & ext_info == "get future appt details" replace act_mca_activity = "appointment details" if act_type == "Visits" & ext_info == "get future appt list" replace act_mca_activity = "appointment details" if act_type == "Visits" & ext_info == "get past appt list" replace act_mca_activity = "appointment details" if act_type == "Visits" & ext_info == "iphone: get future appt details" replace act_mca_activity = "appointment details" if act_type == "Visits" & ext_info == "iphone: get future appt list" replace act_mca_activity = "appointment details" if act_type == "Visits" & ext_info == "iphone: get past appt list" replace act_mca_activity = "appointment details" if act_type == "Visits" & ext_info == "load-past-appointments-list" replace act_mca_activity = "appointment details" if act_type == "Visits" & ext_info == "null" replace act_mca_activity = "widget" if act_type == "Visits" & ext_info == "plan of care - todo widget." replace act_mca_activity = "wallet card" if act_type == "Wallet Card" replace act_mca_activity_group = "Billing" if act_type == "Account Details" replace act_mca_activity_group = "Billing" if act_type == "Account Inquiry" replace act_mca_activity_group = "Billing" if act_type == "Account Payment" replace act_mca_activity_group = "Misc." if act_type == "Account ReEnable" replace act_mca_activity_group = "Visits" if act_type == "Add To Calendar" replace act_mca_activity_group = "Preferences" if act_type == "Address Change Request" replace act_mca_activity_group = "" if act_type == "Advanced Care Planning" replace act_mca_activity_group = "Medical Tools" if act_type == "Alerts Retrieved from Remote System" replace act_mca_activity_group = "What's in my record" if act_type == "Allergies" replace act_mca_activity_group = "Visits" if act_type == "Appointment Cancel" replace act_mca_activity_group = "Visits" if act_type == "Appointment Confirm" replace act_mca_activity_group = "Visits" if act_type == "Appointment Direct Cancel" replace act_mca_activity_group = "Visits" if act_type == "Appointment Request" replace act_mca_activity_group = "Visits" if act_type == "Appointment Request" & ext_info == "cancel" replace act_mca_activity_group = "Medical Tools" if act_type == "Audit Trail" replace act_mca_activity_group = "Billing" if act_type == "Change Paperless Status" replace act_mca_activity_group = "Preferences" if act_type == "Change Password" replace act_mca_activity_group = "Proxy Forms" if act_type == "Community Authorization" replace act_mca_activity_group = "Proxy Forms" if act_type == "Community Link Validation Failure" replace act_mca_activity_group = "Proxy Forms" if act_type == "Community Link Validation Success" replace act_mca_activity_group = "Proxy Forms" if act_type == "Community Management" replace act_mca_activity_group = "Proxy Forms" if act_type == "Community Terms and Conditions" replace act_mca_activity_group = "Billing" if act_type == "Coverage View" replace act_mca_activity_group = "Medical Tools" if act_type == "Create External Link" replace act_mca_activity_group = "What's in my record" if act_type == "Custom Configured Report" replace act_mca_activity_group = "Visits" if act_type == "Custom Configured Report" & ext_info == "submode^upcomingorders" replace act_mca_activity_group = "Messaging" if act_type == "Customer Service Request" replace act_mca_activity_group = "Misc." if act_type == "Device - Add" replace act_mca_activity_group = "Misc." if act_type == "Device - Auth" replace act_mca_activity_group = "Misc." if act_type == "Device - List" replace act_mca_activity_group = "Misc." if act_type == "Device - Remove All" replace act_mca_activity_group = "Misc." if act_type == "Device - Remove" replace act_mca_activity_group = "Visits" if act_type == "Direct Scheduling Process" replace act_mca_activity_group = "Visits" if act_type == "Direct Scheduling Process" & ext_info == "appointment scheduled" replace act_mca_activity_group = "Medical Tools" if act_type == "Download Requested ROI Record" replace act_mca_activity_group = "Visits" if act_type == "Download Visit Summary" replace act_mca_activity_group = "Visits" if act_type == "Driving Directions" replace act_mca_activity_group = "Visits" if act_type == "eCheck-In" replace act_mca_activity_group = "Visits" if act_type == "Encounter Details" replace act_mca_activity_group = "Visits" if act_type == "EVisit" replace act_mca_activity_group = "Medical Tools" if act_type == "Form - Medical Record" replace act_mca_activity_group = "" if act_type == "Full External Jump" replace act_mca_activity_group = "Medical Tools" if act_type == "Generated Share Everywhere Token" replace act_mca_activity_group = "Widget" if act_type == "Goals" replace act_mca_activity_group = "Billing" if act_type == "HB Account Details" replace act_mca_activity_group = "Billing" if act_type == "HB/SBO Auto Pay Signup" replace act_mca_activity_group = "Billing" if act_type == "HB/SBO Auto Pay Update" replace act_mca_activity_group = "" if act_type == "Health Maintenance - Mark As Complete" replace act_mca_activity_group = "Widget" if act_type == "Health Maintenance" replace act_mca_activity_group = "What's in my record" if act_type == "Health Summary" replace act_mca_activity_group = "Visits" if act_type == "History Questionnaire" replace act_mca_activity_group = "Billing" if act_type == "Hospital Statement Details" replace act_mca_activity_group = "What's in my record" if act_type == "Immunizations" replace act_mca_activity_group = "" if act_type == "Inline External Jump" replace act_mca_activity_group = "Visits" if act_type == "Inpatient Admissions" replace act_mca_activity_group = "Widget" if act_type == "Inpatient Admissions" & ext_info == "list" replace act_mca_activity_group = "Widget" if act_type == "Inpatient Admissions" & ext_info == "load-past-admissions-list" replace act_mca_activity_group = "Billing" if act_type == "Insurance ID Card" replace act_mca_activity_group = "Billing" if act_type == "Insurance" replace act_mca_activity_group = "Medical Tools" if act_type == "Jump to External System" replace act_mca_activity_group = "" if act_type == "L&D Pre-Admission Accessed" replace act_mca_activity_group = "Messaging" if act_type == "Letters" replace act_mca_activity_group = "Misc." if act_type == "Log In From External System" replace act_mca_activity_group = "Misc." if act_type == "Login" replace act_mca_activity_group = "Misc." if act_type == "Logout" replace act_mca_activity_group = "Messaging" if act_type == "Medical Advice Request" replace act_mca_activity_group = "Messaging" if act_type == "Medical Advice Request" & regexm(ext_info, "new test result message$") replace act_mca_activity_group = "Messaging" if act_type == "Medical Advice Request" & regexm(ext_info, "through new msg$") replace act_mca_activity_group = "Messaging" if act_type == "Medical Advice Request" & ext_info == "new msg" replace act_mca_activity_group = "Widget" if act_type == "Medical Histories" replace act_mca_activity_group = "What's in my record" if act_type == "Medication Renewal Request" replace act_mca_activity_group = "What's in my record" if act_type == "Medications" replace act_mca_activity_group = "What's in my record" if act_type == "Medications" & ext_info == "medications loaded" replace act_mca_activity_group = "Messaging" if act_type == "Messaging" replace act_mca_activity_group = "Messaging" if act_type == "Messaging" & regexm(ext_info, "^[0-9]+") replace act_mca_activity_group = "Messaging" if act_type == "Messaging" & regexm(ext_info, "^check reply") replace act_mca_activity_group = "Messaging" if act_type == "Messaging" & regexm(ext_info, "^delete messages") replace act_mca_activity_group = "Messaging" if act_type == "Messaging" & regexm(ext_info, "message read$") replace act_mca_activity_group = "Messaging" if act_type == "Messaging" & regexm(ext_info, "reply to") replace act_mca_activity_group = "Messaging" if act_type == "Messaging" & ext_info == "read" replace act_mca_activity_group = "Messaging" if act_type == "Messaging" & ext_info == "view message attachment" replace act_mca_activity_group = "What's in my record" if act_type == "My Conditions" replace act_mca_activity_group = "Preferences" if act_type == "Notification Preferences" replace act_mca_activity_group = "Visits" if act_type == "Open Scheduling (Internal)" replace act_mca_activity_group = "Billing" if act_type == "Other" replace act_mca_activity_group = "Proxy Forms" if act_type == "Other" & ext_info == "new msg" replace act_mca_activity_group = "" if act_type == "Other" & ext_info == "null" replace act_mca_activity_group = "" if act_type == "Other" & ext_info == "update statement viewed status" replace act_mca_activity_group = "Preferences" if act_type == "Password Reset Question Answer" replace act_mca_activity_group = "What's in my record" if act_type == "Patient Entered Flowsheet" replace act_mca_activity_group = "Billing" if act_type == "Patient Estimates - Create Estimate" replace act_mca_activity_group = "Billing" if act_type == "Patient Estimates - Estimate Details" replace act_mca_activity_group = "Billing" if act_type == "Patient Estimates - Estimate List" replace act_mca_activity_group = "Visits" if act_type == "Patient Initiated Questionnaires" replace act_mca_activity_group = "" if act_type == "Patient Notes" replace act_mca_activity_group = "What's in my record" if act_type == "Pharmacies" replace act_mca_activity_group = "What's in my record" if act_type == "Pharmacies" & ext_info == "get pharmacies~success" replace act_mca_activity_group = "Visits" if act_type == "Preventative Care Scheduling" replace act_mca_activity_group = "Visits" if act_type == "Preventative Care Scheduling" & ext_info == "new msg" replace act_mca_activity_group = "What's in my record" if act_type == "Problem List" replace act_mca_activity_group = "" if act_type == "Procedures" replace act_mca_activity_group = "Widget" if act_type == "Provider List Widget" replace act_mca_activity_group = "Preferences" if act_type == "Proxy Access (View)" replace act_mca_activity_group = "Proxy Forms" if act_type == "Proxy Context Enter" replace act_mca_activity_group = "Proxy Forms" if act_type == "Proxy Context Exit" replace act_mca_activity_group = "Visits" if act_type == "Questionnaire" replace act_mca_activity_group = "Billing" if act_type == "Recent Payments" replace act_mca_activity_group = "Medical Tools" if act_type == "Remote Chart Information" replace act_mca_activity_group = "Medical Tools" if act_type == "Remove External Link" replace act_mca_activity_group = "Medical Tools" if act_type == "Research Studies" replace act_mca_activity_group = "Visits" if act_type == "Respond To Appointment Offer" replace act_mca_activity_group = "What's in my record" if act_type == "Result Component Graphing" replace act_mca_activity_group = "Preferences" if act_type == "Scheduling and Other Preferences" replace act_mca_activity_group = "Misc." if act_type == "Secondary Identity Validation" replace act_mca_activity_group = "Medical Tools" if act_type == "Send Document to PHR" replace act_mca_activity_group = "Proxy Forms" if act_type == "Switch Proxy Context" replace act_mca_activity_group = "Visits" if act_type == "Telemedicine Connect" replace act_mca_activity_group = "Visits" if act_type == "Telemedicine Disconnect" replace act_mca_activity_group = "Visits" if act_type == "Telemedicine Hardware Test" replace act_mca_activity_group = "Visits" if act_type == "Telemedicine Initialize" replace act_mca_activity_group = "Visits" if act_type == "Telemedicine Streaming Status Change" replace act_mca_activity_group = "" if act_type == "Terms and Conditions" & ext_info == "accept" replace act_mca_activity_group = "" if act_type == "Terms and Conditions" & ext_info == "decline" replace act_mca_activity_group = "Proxy Forms" if act_type == "Terms and Conditions" & ext_info == "iphone: view" replace act_mca_activity_group = "Resources" if act_type == "Terms and Conditions" & ext_info == "iphone:" replace act_mca_activity_group = "Resources" if act_type == "Terms and Conditions" & ext_info == "null" replace act_mca_activity_group = "Proxy Forms" if act_type == "Terms and Conditions" & ext_info == "view" replace act_mca_activity_group = "What's in my record" if act_type == "Test Result Details" replace act_mca_activity_group = "What's in my record" if act_type == "Test Results List" replace act_mca_activity_group = "" if act_type == "Transmit Visit Summary" replace act_mca_activity_group = "Visits" if act_type == "Upcoming Appointment Details" replace act_mca_activity_group = "Widget" if act_type == "Upcoming Orders" replace act_mca_activity_group = "What's in my record" if act_type == "Update Allergies" replace act_mca_activity_group = "Billing" if act_type == "Update Insurance" replace act_mca_activity_group = "What's in my record" if act_type == "Update Medications" replace act_mca_activity_group = "Visits" if act_type == "Update Wait List" replace act_mca_activity_group = "" if act_type == "View CE Authorization" replace act_mca_activity_group = "" if act_type == "View Education Title" replace act_mca_activity_group = "" if act_type == "View Patient Note To Self" replace act_mca_activity_group = "Medical Tools" if act_type == "View Requested ROI Records" replace act_mca_activity_group = "What's in my record" if act_type == "View Scan" replace act_mca_activity_group = "Visits" if act_type == "View Visit Summary" replace act_mca_activity_group = "Medical Tools" if act_type == "View/Download Lucy CCD" replace act_mca_activity_group = "Billing" if act_type == "Visit Payments" replace act_mca_activity_group = "Visits" if act_type == "Visits" & ext_info == "appointments-list~success" replace act_mca_activity_group = "Visits" if act_type == "Visits" & ext_info == "get future appt details" replace act_mca_activity_group = "Visits" if act_type == "Visits" & ext_info == "get future appt list" replace act_mca_activity_group = "Visits" if act_type == "Visits" & ext_info == "get past appt list" replace act_mca_activity_group = "Visits" if act_type == "Visits" & ext_info == "iphone: get future appt details" replace act_mca_activity_group = "Visits" if act_type == "Visits" & ext_info == "iphone: get future appt list" replace act_mca_activity_group = "Visits" if act_type == "Visits" & ext_info == "iphone: get past appt list" replace act_mca_activity_group = "Visits" if act_type == "Visits" & ext_info == "load-past-appointments-list" replace act_mca_activity_group = "Visits" if act_type == "Visits" & ext_info == "null" replace act_mca_activity_group = "Widget" if act_type == "Visits" & ext_info == "plan of care - todo widget." replace act_mca_activity_group = "Medical Tools" if act_type == "Wallet Card" replace act_active = 0 if act_type == "Account Details" replace act_active = 0 if act_type == "Account Inquiry" replace act_active = 1 if act_type == "Account Payment" replace act_active = 0 if act_type == "Account ReEnable" replace act_active = 1 if act_type == "Add To Calendar" replace act_active = 0 if act_type == "Address Change Request" replace act_active = 0 if act_type == "Advanced Care Planning" replace act_active = 0 if act_type == "Alerts Retrieved from Remote System" replace act_active = 1 if act_type == "Allergies" replace act_active = 1 if act_type == "Appointment Cancel" replace act_active = 1 if act_type == "Appointment Confirm" replace act_active = 1 if act_type == "Appointment Direct Cancel" replace act_active = 1 if act_type == "Appointment Request" replace act_active = 0 if act_type == "Appointment Request" & ext_info == "cancel" replace act_active = 1 if act_type == "Audit Trail" replace act_active = 1 if act_type == "Change Paperless Status" replace act_active = 1 if act_type == "Change Password" replace act_active = 1 if act_type == "Community Authorization" replace act_active = 1 if act_type == "Community Link Validation Failure" replace act_active = 1 if act_type == "Community Link Validation Success" replace act_active = 1 if act_type == "Community Management" replace act_active = 0 if act_type == "Community Terms and Conditions" replace act_active = 0 if act_type == "Coverage View" replace act_active = 1 if act_type == "Create External Link" replace act_active = 1 if act_type == "Custom Configured Report" replace act_active = 1 if act_type == "Custom Configured Report" & ext_info == "submode^upcomingorders" replace act_active = 1 if act_type == "Customer Service Request" replace act_active = 1 if act_type == "Device - Add" replace act_active = 0 if act_type == "Device - Auth" replace act_active = 1 if act_type == "Device - List" replace act_active = . if act_type == "Device - Remove All" replace act_active = . if act_type == "Device - Remove" replace act_active = 0 if act_type == "Direct Scheduling Process" replace act_active = 1 if act_type == "Direct Scheduling Process" & ext_info == "appointment scheduled" replace act_active = 1 if act_type == "Download Requested ROI Record" replace act_active = 1 if act_type == "Download Visit Summary" replace act_active = 1 if act_type == "Driving Directions" replace act_active = 1 if act_type == "eCheck-In" replace act_active = 1 if act_type == "Encounter Details" replace act_active = 0 if act_type == "EVisit" replace act_active = 1 if act_type == "Form - Medical Record" replace act_active = . if act_type == "Full External Jump" replace act_active = 1 if act_type == "Generated Share Everywhere Token" replace act_active = 0 if act_type == "Goals" replace act_active = 1 if act_type == "HB Account Details" replace act_active = 1 if act_type == "HB/SBO Auto Pay Signup" replace act_active = 1 if act_type == "HB/SBO Auto Pay Update" replace act_active = . if act_type == "Health Maintenance - Mark As Complete" replace act_active = 0 if act_type == "Health Maintenance" replace act_active = 1 if act_type == "Health Summary" replace act_active = 1 if act_type == "History Questionnaire" replace act_active = . if act_type == "Hospital Statement Details" replace act_active = 1 if act_type == "Immunizations" replace act_active = . if act_type == "Inline External Jump" replace act_active = 1 if act_type == "Inpatient Admissions" replace act_active = 0 if act_type == "Inpatient Admissions" & ext_info == "list" replace act_active = 0 if act_type == "Inpatient Admissions" & ext_info == "load-past-admissions-list" replace act_active = 1 if act_type == "Insurance ID Card" replace act_active = 1 if act_type == "Insurance" replace act_active = 1 if act_type == "Jump to External System" replace act_active = 0 if act_type == "L&D Pre-Admission Accessed" replace act_active = 1 if act_type == "Letters" replace act_active = 0 if act_type == "Log In From External System" replace act_active = 0 if act_type == "Login" replace act_active = 0 if act_type == "Logout" replace act_active = 0 if act_type == "Medical Advice Request" replace act_active = 0 if act_type == "Medical Advice Request" & regexm(ext_info, "new test result message$") replace act_active = 0 if act_type == "Medical Advice Request" & regexm(ext_info, "through new msg$") replace act_active = 1 if act_type == "Medical Advice Request" & ext_info == "new msg" replace act_active = 0 if act_type == "Medical Histories" replace act_active = 1 if act_type == "Medication Renewal Request" replace act_active = . if act_type == "Medications" replace act_active = 0 if act_type == "Medications" & ext_info == "medications loaded" replace act_active = 0 if act_type == "Messaging" replace act_active = 1 if act_type == "Messaging" & regexm(ext_info, "^[0-9]+") replace act_active = 1 if act_type == "Messaging" & regexm(ext_info, "^check reply") replace act_active = 1 if act_type == "Messaging" & regexm(ext_info, "^delete messages") replace act_active = 1 if act_type == "Messaging" & regexm(ext_info, "message read$") replace act_active = 1 if act_type == "Messaging" & regexm(ext_info, "reply to") replace act_active = 1 if act_type == "Messaging" & ext_info == "read" replace act_active = 1 if act_type == "Messaging" & ext_info == "view message attachment" replace act_active = 1 if act_type == "My Conditions" replace act_active = 1 if act_type == "Notification Preferences" replace act_active = 1 if act_type == "Open Scheduling (Internal)" replace act_active = 1 if act_type == "Other" replace act_active = 1 if act_type == "Other" & ext_info == "new msg" replace act_active = . if act_type == "Other" & ext_info == "null" replace act_active = . if act_type == "Other" & ext_info == "update statement viewed status" replace act_active = 1 if act_type == "Password Reset Question Answer" replace act_active = 1 if act_type == "Patient Entered Flowsheet" replace act_active = 1 if act_type == "Patient Estimates - Create Estimate" replace act_active = 1 if act_type == "Patient Estimates - Estimate Details" replace act_active = 1 if act_type == "Patient Estimates - Estimate List" replace act_active = 1 if act_type == "Patient Initiated Questionnaires" replace act_active = . if act_type == "Patient Notes" replace act_active = 1 if act_type == "Pharmacies" replace act_active = 0 if act_type == "Pharmacies" & ext_info == "get pharmacies~success" replace act_active = 0 if act_type == "Preventative Care Scheduling" replace act_active = 1 if act_type == "Preventative Care Scheduling" & ext_info == "new msg" replace act_active = 1 if act_type == "Problem List" replace act_active = . if act_type == "Procedures" replace act_active = 0 if act_type == "Provider List Widget" replace act_active = 1 if act_type == "Proxy Access (View)" replace act_active = 1 if act_type == "Proxy Context Enter" replace act_active = 1 if act_type == "Proxy Context Exit" replace act_active = 1 if act_type == "Questionnaire" replace act_active = 1 if act_type == "Recent Payments" replace act_active = 1 if act_type == "Remote Chart Information" replace act_active = 1 if act_type == "Remove External Link" replace act_active = 1 if act_type == "Research Studies" replace act_active = 1 if act_type == "Respond To Appointment Offer" replace act_active = 1 if act_type == "Result Component Graphing" replace act_active = 1 if act_type == "Scheduling and Other Preferences" replace act_active = 0 if act_type == "Secondary Identity Validation" replace act_active = . if act_type == "Send Document to PHR" replace act_active = . if act_type == "Switch Proxy Context" replace act_active = 1 if act_type == "Telemedicine Connect" replace act_active = 1 if act_type == "Telemedicine Disconnect" replace act_active = 1 if act_type == "Telemedicine Hardware Test" replace act_active = 1 if act_type == "Telemedicine Initialize" replace act_active = . if act_type == "Telemedicine Streaming Status Change" replace act_active = 0 if act_type == "Terms and Conditions" & ext_info == "accept" replace act_active = 0 if act_type == "Terms and Conditions" & ext_info == "decline" replace act_active = 0 if act_type == "Terms and Conditions" & ext_info == "iphone: view" replace act_active = 0 if act_type == "Terms and Conditions" & ext_info == "iphone:" replace act_active = 0 if act_type == "Terms and Conditions" & ext_info == "null" replace act_active = 0 if act_type == "Terms and Conditions" & ext_info == "view" replace act_active = 1 if act_type == "Test Result Details" replace act_active = 0 if act_type == "Test Results List" replace act_active = . if act_type == "Transmit Visit Summary" replace act_active = 1 if act_type == "Upcoming Appointment Details" replace act_active = 0 if act_type == "Upcoming Orders" replace act_active = 1 if act_type == "Update Allergies" replace act_active = 1 if act_type == "Update Insurance" replace act_active = 1 if act_type == "Update Medications" replace act_active = 1 if act_type == "Update Wait List" replace act_active = . if act_type == "View CE Authorization" replace act_active = . if act_type == "View Education Title" replace act_active = . if act_type == "View Patient Note To Self" replace act_active = . if act_type == "View Requested ROI Records" replace act_active = 1 if act_type == "View Scan" replace act_active = 1 if act_type == "View Visit Summary" replace act_active = 1 if act_type == "View/Download Lucy CCD" replace act_active = 1 if act_type == "Visit Payments" replace act_active = 0 if act_type == "Visits" & ext_info == "appointments-list~success" replace act_active = . if act_type == "Visits" & ext_info == "get future appt details" replace act_active = . if act_type == "Visits" & ext_info == "get future appt list" replace act_active = . if act_type == "Visits" & ext_info == "get past appt list" replace act_active = . if act_type == "Visits" & ext_info == "iphone: get future appt details" replace act_active = . if act_type == "Visits" & ext_info == "iphone: get future appt list" replace act_active = . if act_type == "Visits" & ext_info == "iphone: get past appt list" replace act_active = 0 if act_type == "Visits" & ext_info == "load-past-appointments-list" replace act_active = . if act_type == "Visits" & ext_info == "null" replace act_active = 0 if act_type == "Visits" & ext_info == "plan of care - todo widget." replace act_active = 1 if act_type == "Wallet Card" save "`out_dir'/MCA_tasks", replace