├── Gemfile ├── log └── .keep ├── storage └── .keep ├── tmp ├── .keep └── pids │ └── .keep ├── vendor └── .keep ├── Gemfile.lock ├── lib ├── assets │ └── .keep ├── tasks │ ├── .keep │ ├── get_sqs_messages.rake │ ├── fetch_ndiis_forecast.rake │ └── custom_seed.rake └── reporting_api_auth.rb ├── yarn.lock ├── .ruby-version ├── app ├── assets │ ├── images │ │ ├── .keep │ │ ├── device.png │ │ ├── logo.png │ │ ├── favicon.ico │ │ ├── spinner1.gif │ │ ├── cgm_report.png │ │ ├── email-email.png │ │ ├── email-head1.png │ │ ├── email-head2.png │ │ ├── email-head3.png │ │ ├── email-head4.png │ │ ├── email-head5.png │ │ ├── email-head6.png │ │ ├── email-head7.png │ │ ├── email-head8.png │ │ ├── email-head9.png │ │ ├── email-logo.png │ │ ├── menu-chat.png │ │ ├── menu-labs.png │ │ ├── menu-track.png │ │ ├── pencil_grey.png │ │ ├── small-logo.png │ │ ├── sort-plain.png │ │ ├── splash-wide.png │ │ ├── sync-device.png │ │ ├── chat_rev_icon.png │ │ ├── menu-my-data.png │ │ ├── plain_hexagon.png │ │ ├── track-glucose.png │ │ ├── track-weight.png │ │ ├── chat_close_icon.png │ │ ├── create-channel.png │ │ ├── email-getstarted.png │ │ ├── email-password.png │ │ ├── flip_icon_c_to_p.png │ │ ├── flip_icon_p_to_c.png │ │ ├── menu-care-plan.png │ │ ├── menu-medications.png │ │ ├── sort-ascending.png │ │ ├── sort-descending.png │ │ ├── starfield_logo.gif │ │ ├── menu-minus-circle.png │ │ ├── new_large_loading.gif │ │ ├── plain_hexagon_tiny.png │ │ ├── providers_inactive.png │ │ ├── the_wall_icon_grey.png │ │ ├── patient_reports_icon.png │ │ ├── plain_hexagon_black.png │ │ ├── plain_hexagon_red_dot.png │ │ ├── track-blood-pressure.png │ │ ├── chat_rev_icon_new_msgs.png │ │ ├── nav_icons │ │ │ ├── nav_chat_icon.png │ │ │ ├── nav_hie_icon.png │ │ │ ├── nav_catalog_icon.png │ │ │ ├── nav_queue_icon.png │ │ │ ├── nav_care_plan_icon.png │ │ │ ├── nav_customers_icon.png │ │ │ ├── nav_patients_icon.png │ │ │ ├── nav_settings_icon.png │ │ │ ├── nav_add_patient_icon.png │ │ │ └── nav_patient_lists_icon.png │ │ ├── add_new_user_to_chat_icon.png │ │ ├── chat_icon_with_orange_line.png │ │ ├── patient_reports_white_icon.png │ │ ├── plain_hexagon_black_tiny.png │ │ ├── starfield_logo_transparent.gif │ │ ├── add_new_user_to_chat_patient_icon.png │ │ ├── arrow_down.svg │ │ ├── arrow_up.svg │ │ ├── category_icons │ │ │ ├── hospital.svg │ │ │ ├── landscape.svg │ │ │ ├── note.svg │ │ │ ├── chatbubble.svg │ │ │ ├── controlpoint.svg │ │ │ ├── security.svg │ │ │ ├── account.svg │ │ │ ├── hourglass.svg │ │ │ ├── bar.svg │ │ │ ├── hand.svg │ │ │ ├── control_point.svg │ │ │ ├── heart.svg │ │ │ ├── droplet.svg │ │ │ ├── schedule.svg │ │ │ ├── city.svg │ │ │ ├── phone_link.svg │ │ │ ├── fitness.svg │ │ │ ├── chat_bubble.svg │ │ │ ├── golf.svg │ │ │ ├── events.svg │ │ │ └── walk.svg │ │ ├── md-filter.svg │ │ ├── transfer.svg │ │ ├── search.svg │ │ ├── md-close.svg │ │ └── history_icon.svg │ ├── config │ │ └── manifest.js │ ├── stylesheets │ │ ├── application │ │ │ ├── layout │ │ │ │ └── layout.scss │ │ │ ├── reports │ │ │ │ └── user_data.scss │ │ │ ├── patient │ │ │ │ └── patient_mobile_error.scss │ │ │ ├── adt_notifications.scss │ │ │ └── pagination.scss │ │ ├── patient_providers.scss │ │ ├── action_step_automation.scss │ │ └── action_step_quick_launch.scss │ └── fonts │ │ ├── Quicksand-Bold.ttf │ │ ├── Quicksand-Light.ttf │ │ ├── Quicksand-Medium.ttf │ │ ├── Quicksand-Regular.ttf │ │ └── Quicksand-SemiBold.ttf ├── models │ ├── concerns │ │ └── .keep │ ├── sqs_log.rb │ ├── place_of_service_code.rb │ ├── company_action_setting.rb │ ├── adt_inbound_notification.rb │ ├── board_message.rb │ ├── follow_up_date.rb │ ├── patient_insurance_type.rb │ ├── recurring_action.rb │ ├── glucose_reading.rb │ ├── patient_ndiis_account.rb │ ├── instruction_block.rb │ ├── encounter_note_block.rb │ ├── option.rb │ ├── customer_selection.rb │ ├── encounter1500_information.rb │ ├── questionnaire_action.rb │ ├── encounter_claim_information.rb │ ├── patient_note.rb │ ├── action_queue_history.rb │ ├── multiple_choice_answer.rb │ ├── assignment_history.rb │ ├── provider_action_resource.rb │ ├── application_record.rb │ ├── questionnaire_resource.rb │ ├── notes_template_block.rb │ ├── adt_provider_action.rb │ ├── patient_action_group_action.rb │ ├── action_pathway_week_action.rb │ ├── patient_lab.rb │ ├── customer_default_privilege.rb │ ├── customer_user_privilege.rb │ ├── patient_care_plan_row.rb │ ├── patient_list.rb │ ├── eb_send_charges_log.rb │ ├── pharmacy_group.rb │ ├── assigned_action_resource.rb │ ├── action_category.rb │ ├── privilege.rb │ ├── questionnaire_qr.rb │ ├── action_step_resource.rb │ ├── action_step_queue.rb │ ├── chat_channel_user.rb │ ├── action_recurrence.rb │ ├── lab_reading.rb │ ├── action_resource.rb │ ├── patient_device.rb │ ├── cpt_code.rb │ ├── customer_permission_control.rb │ ├── patient_action_group.rb │ ├── encounter_note.rb │ ├── ambulatory_weekly_result.rb │ ├── notes_template.rb │ ├── result.rb │ ├── ltc_facility_assignment.rb │ ├── diagnosis_assignment.rb │ ├── action_pathway.rb │ ├── action_step_quick_launch.rb │ ├── ltc_facility.rb │ ├── dummy_email.rb │ ├── patient_medication.rb │ ├── weight_reading.rb │ ├── action_step_automation.rb │ ├── patient_instruction.rb │ ├── action_pathway_week.rb │ ├── assigned_pathway_week.rb │ ├── patient_historical_immunization.rb │ ├── encounter_billing_logger.rb │ └── customer_permission.rb ├── controllers │ ├── concerns │ │ └── .keep │ └── users │ │ └── sessions_controller.rb ├── javascript │ ├── components │ │ ├── .keep │ │ ├── PrivilegesContext.tsx │ │ ├── utils │ │ │ ├── PrivilegesHelper.tsx │ │ │ └── HeaderHelper.tsx │ │ └── styles │ │ │ └── useChatStyles.tsx │ ├── images │ │ ├── plusIcon.png │ │ └── check.svg │ ├── channels │ │ ├── index.js │ │ └── consumer.js │ └── packs │ │ └── server_rendering.js ├── views │ ├── layouts │ │ ├── mailer.text.erb │ │ ├── mailer.html.erb │ │ └── _need_help.html.erb │ ├── pdf_mailer │ │ └── send_instructions_pdf.txt │ ├── guided_questionnaires │ │ ├── expired_qr.html.erb │ │ ├── tablet_questionnaire.html.erb │ │ └── select_questionnaires.html.erb │ ├── devise │ │ ├── mailer │ │ │ ├── password_change.html.erb │ │ │ ├── confirmation_instructions.html.erb │ │ │ ├── unlock_instructions.html.erb │ │ │ ├── email_changed.html.erb │ │ │ └── reset_password_instructions.html.erb │ │ ├── sessions │ │ │ └── new.html.erb │ │ ├── passwords │ │ │ ├── new.html.erb │ │ │ └── edit.html.erb │ │ ├── invitations │ │ │ └── edit.html.erb │ │ └── shared │ │ │ └── _error_messages.html.erb │ ├── admin │ │ └── reports │ │ │ └── vax_aggregate_report.csv.erb │ ├── patients │ │ ├── patient_invited.html.erb │ │ ├── undo_email.html.erb │ │ └── undo_password.html.erb │ ├── two_factor_auth │ │ └── new.html.erb │ ├── customer_selections │ │ └── new.html.erb │ ├── questionnaire_assignments │ │ └── submission.html.erb │ └── pages │ │ └── customer_consent_new.html.erb ├── channels │ └── application_cable │ │ ├── channel.rb │ │ └── connection.rb ├── mailers │ └── application_mailer.rb ├── jobs │ ├── process_ndm_reports_job.rb │ ├── create_live_actions_job.rb │ └── application_job.rb ├── helpers │ ├── general_helper.rb │ ├── log_helper.rb │ └── date_helper.rb ├── services │ └── jwt_service.rb └── sms_templates │ └── unread_message_sms.rb ├── config ├── application.yml ├── initializers │ ├── constants.rb │ ├── wicked_pdf.rb │ ├── mime_types.rb │ ├── filter_parameter_logging.rb │ ├── application_controller_renderer.rb │ ├── cookies_serializer.rb │ ├── lograge.rb │ ├── stream.rb │ └── backtrace_silencers.rb ├── spring.rb ├── webpack │ ├── test.js │ ├── production.js │ ├── .modernizrrc.js │ ├── loaders │ │ └── typescript.js │ ├── environment.js │ ├── development.js │ └── modernizr_config.js ├── cable.yml ├── boot.rb └── environment.rb ├── public ├── apple-touch-icon.png ├── apple-touch-icon-precomposed.png ├── favicon.ico └── robots.txt ├── .rspec ├── README.md ├── Procfile ├── spec ├── factories │ ├── patient_instructions.rb │ ├── place_of_service_codes.rb │ ├── instruction_note_blocks.rb │ ├── customer_permissions.rb │ ├── options.rb │ ├── patient_lists.rb │ ├── patient_notes.rb │ ├── action_pathways.rb │ ├── customer.rb │ ├── multiple_choice_answers.rb │ ├── questions.rb │ ├── recurring_actions.rb │ ├── action_categories.rb │ ├── encounter_billing_send_charges_logs.rb │ ├── encounter_note_blocks.rb │ ├── chat_channels.rb │ ├── patient_action_groups.rb │ ├── questionnaire_resources.rb │ ├── assigned_action_resources.rb │ ├── customer_selections.rb │ ├── patient_devices.rb │ ├── resource_items.rb │ ├── questionnaire_actions.rb │ ├── action_resources.rb │ ├── ambulatory_weekly_results.rb │ ├── action_pathway_weeks.rb │ ├── assigned_pathway_weeks.rb │ ├── customer_permission_controls.rb │ ├── patient_labs.rb │ ├── chat_channel_users.rb │ ├── patient_medications.rb │ ├── action_pathway_week_actions.rb │ ├── answers.rb │ ├── assigned_pathways.rb │ ├── patient_action_group_actions.rb │ ├── questionnaire_categories.rb │ ├── questionnaire_qrs.rb │ ├── actions.rb │ ├── weight_readings.rb │ ├── blood_pressure_readings.rb │ ├── assigned_actions.rb │ ├── user.rb │ ├── patient_device_readings.rb │ ├── customer_users.rb │ └── assigned_pathway_week_actions.rb ├── models │ ├── answer_spec.rb │ ├── option_spec.rb │ ├── question_spec.rb │ ├── questionnaire_qr_spec.rb │ ├── place_of_service_code_spec.rb │ ├── questionnaire_action_spec.rb │ ├── multiple_choice_answer_spec.rb │ ├── questionnaire_category_spec.rb │ ├── questionnaire_resource_spec.rb │ ├── customer_spec.rb │ ├── action_category_spec.rb │ ├── chat_channel_spec.rb │ └── patient_device_spec.rb └── requests │ ├── customer_permissions_spec.rb │ ├── guided_questionnaires_spec.rb │ └── questionnaire_categories_spec.rb ├── .prettierr.js ├── db ├── migrate │ ├── 20220209174223_drop_labs_table.rb │ ├── 20220225171317_drop_user_privileges.rb │ ├── 20220224172107_drop_pharmacy_group_table.rb │ ├── 20220610195753_add_facilily_npi.rb │ ├── 20240702073918_add_accepted_to_answers.rb │ ├── 20211013203014_add_locked_at_to_users.rb │ ├── 20221012170402_add_terms_to_user.rb │ ├── 20240508165957_add_category_to_actions.rb │ ├── 20220307131438_remove_is_admin_from_user.rb │ ├── 20220516062017_add_mrn_number_to_patient.rb │ ├── 20220608213651_add_npi_field_on_users.rb │ ├── 20220608215756_remove_status_from_customers.rb │ ├── 20221021195841_add_adt_time_stamp.rb │ ├── 20230614145651_add_last_contact_to_users.rb │ ├── 20220131233051_remove_phone_number_from_user.rb │ ├── 20220201153120_change_null_constrain.rb │ ├── 20240712192629_add_position_to_questions.rb │ ├── 20220120174642_change_name_field_to_first_name.rb │ ├── 20220307131427_remove_is_admin_from_customer_user.rb │ ├── 20220518183414_add_uniq_id_on_channels.rb │ ├── 20220524050058_add_user_invitation_type.rb │ ├── 20221125193930_add_term_timestamp_to_users.rb │ ├── 20240905100046_add_ltc_facility_to_users.rb │ ├── 20210322173822_add_name_to_users.rb │ ├── 20220131214945_add_phone_number_to_customers.rb │ ├── 20220204152030_add_signature_on_customer_user.rb │ ├── 20220224170721_remove_pharmacy_group_id_from_users.rb │ ├── 20220613162309_add_federal_tax_id_on_customers.rb │ ├── 20230327163516_change_date_of_birth_column_to_date.rb │ ├── 20230913153251_remove_not_null_constraint.rb │ ├── 20210405160455_add_gender_to_users.rb │ ├── 20220512194417_add_active_on_chat_channels.rb │ ├── 20230921183233_add_business_phone_number_to_users.rb │ ├── 20240214222607_add_display_on_tablet.rb │ ├── 20240701173401_add_end_timing_to_program_actions.rb │ ├── 20240911144653_add_customer_id_to_ltc_facilities.rb │ ├── 20241023095634_add_cgm_enabled_to_user.rb │ ├── 20210322173329_add_role_to_users_table.rb │ ├── 20210611150032_remove_care_plan_table.rb │ ├── 20210614191021_add_icon_to_actions.rb │ ├── 20220216155610_add_customer_to_patient_actions.rb │ ├── 20230221201822_add_assinged_at_pathway_week.rb │ ├── 20230912185223_add_published_at_on_questionnaires.rb │ ├── 20240816153338_add_notes_to_assignment_histories_table.rb │ ├── 20220524211310_rename_user_inivitation_column.rb │ ├── 20221026164803_add_addendum_to_encounter_notes.rb │ ├── 20230918171909_add_deleted_at_to_users.rb │ ├── 20231211154645_create_sqs_logs.rb │ ├── 20240425061628_action_schema_changes.rb │ ├── 20240521170611_add_end_timing_to_action_recurrences.rb │ ├── 20240827185221_add_insured_to_patient_insurances.rb │ ├── 20210324175730_add_invite_token_to_users.rb │ ├── 20210518141946_add_phone_number_to_users.rb │ ├── 20220526213428_add_adt_notification_on_users.rb │ ├── 20220605141530_add_referenced_on_users.rb │ ├── 20220906205120_add_customer_id_on_encounter_billing.rb │ ├── 20230911155637_add_place_of_service_code_on_customers.rb │ ├── 20231215030802_add_archive_column_to_ndm_reports.rb │ ├── 20210324175445_add_date_of_birth_to_users.rb │ ├── 20210506200604_add_issued_to_patient_labs.rb │ ├── 20210518143305_add_is_active_to_users.rb │ ├── 20220216161459_remove_pharmacy_group_from_patient_actions.rb │ ├── 20220222213233_remove_patient_action_from_assigned_actions.rb │ ├── 20220224170343_remove_pharmacy_group_id_from_resource_items.rb │ ├── 20210608133257_add_last_contact_at_to_users.rb │ ├── 20220223165249_remove_action_pathway_id_from_assigned_pathway.rb │ ├── 20220720164357_rename_billings_to_billing.rb │ ├── 20240916083545_rename_country_to_county_on_patient_insurance.rb │ ├── 20210518125136_add_is_admin_to_users_table.rb │ ├── 20210719133111_add_sort_to_action_categories.rb │ ├── 20220720162614_add_reference_on_encounter_notes.rb │ ├── 20230728214646_add_source_to_assigned_pathway_week_actions.rb │ ├── 20240829071615_add_is_secondary_to_patient_insurances.rb │ ├── 20210506155643_add_patient_identifier_to_users.rb │ ├── 20211013203440_add_lockable_to_devise.rb │ ├── 20230822164313_add_created_by_to_customer_users_table.rb │ ├── 20220120174532_add_middle_last_name_fields_to_user.rb │ ├── 20231017193112_add_resource_id_to_questionnaires_table.rb │ ├── 20210427152007_add_notes_to_patient_device_readings.rb │ ├── 20210826145132_add_start_date_to_assigned_pathways.rb │ ├── 20220204202022_add_coach_id_to_assigned_pathway_week_actions.rb │ ├── 20220722190530_create_cpt_codes.rb │ ├── 20221213172035_add_action_pathway_id_to_assigned_pathways.rb │ ├── 20210322201924_add_pharmacy_group_id_to_users.rb │ ├── 20210427150817_add_source_to_patient_device_readings.rb │ ├── 20210726164529_add_completed_at_to_assigned_actions.rb │ ├── 20220207222733_add_status_to_assigned_pathway_week_actions.rb │ ├── 20220222232741_remove_patient_action_from_action_pathway_week_actions.rb │ ├── 20240420085918_add_archive_column_to_questionnaire_categories.rb │ ├── 20220207225135_change_assigned_pathway_week_action_status_type_to_string.rb │ ├── 20220309215808_add_tokens_to_synced_accounts.rb │ ├── 20231020211810_add_created_by_id_to_weight_readings_table.rb │ ├── 20240213193003_create_customer_permissions.rb │ ├── 20210614125547_add_pharmacy_group_to_actions.rb │ ├── 20220222221213_remove_patient_action_id_from_patient_action_group_actions.rb │ ├── 20220222230848_remove_patient_action_id_from_assigned_pathway_week_actions.rb │ ├── 20220815215042_add_rendering_prov_field.rb │ ├── 20220906213757_add_interchange_number.rb │ ├── 20240830093550_add_patient_insurance_id_to_user.rb │ ├── 20210826191922_add_start_date_to_assigne_pathway_week_actions.rb │ ├── 20220203211445_add_uuid_to_user.rb │ ├── 20230727154333_add_is_manual_cpt_code_to_encounter_claims_information.rb │ ├── 20210726132054_add_patient_action_group_id_to_assigned_actions.rb │ ├── 20230315164023_add_chat_notify_to_users.rb │ ├── 20231020170729_add_created_by_id_to_blood_pressure_readings_table.rb │ ├── 20231024180614_add_created_by_id_to_patient_device_readings_table.rb │ ├── 20210322201828_create_pharmacy_groups.rb │ ├── 20210726164739_add_completed_at_to_assigned_pathway_week_actions.rb │ ├── 20220223172234_add_customer_to_action_to_resource_items.rb │ ├── 20240420090729_add_questionnaire_category_id_column_to_questionnaires.rb │ ├── 20241023200012_create_place_of_service_codes.rb │ ├── 20210611193547_create_action_categories.rb │ ├── 20210810170141_add_password_update_token_to_users.rb │ ├── 20230629183605_create_follow_up_dates.rb │ ├── 20230703214517_create_patient_notes.rb │ ├── 20240628214844_create_options.rb │ ├── 20220607182831_create_adt_inbound_notifications.rb │ ├── 20230612195356_create_patient_lists.rb │ ├── 20230911200835_add_field_on_encounter_insurance.rb │ ├── 20231204145128_create_ndm_reports.rb │ ├── 20220830205807_add_uuid_on_encounter_billings.rb │ ├── 20230613144113_create_join_table_patient_list_user.rb │ ├── 20240508160813_add_customer_id_to_action_categories.rb │ ├── 20240422070643_create_action_steps.rb │ ├── 20240702144954_remove_old_questions_and_old_answers_from_questionnaire.rb │ ├── 20240814180014_change_assigned_provider_actions_table_columns.rb │ ├── 20220223174428_change_pharmacy_group_id_to_customer_id_on_patient_action_pathways.rb │ ├── 20220309202338_create_synced_accounts.rb │ ├── 20210719135544_create_action_pathways.rb │ ├── 20220223173349_change_pharmacy_group_id_to_customer_id_on_patient_action_group.rb │ ├── 20221208213227_create_recurring_actions.rb │ ├── 20230913143818_add_json_column.rb │ ├── 20220718221129_provider_information_on_encounter_billings.rb │ ├── 20220719162705_create_encounter_notes.rb │ ├── 20221208213426_add_creation_type_on_assigned_action.rb │ ├── 20230725141638_create_patient_ndiis_accounts.rb │ ├── 20240828025549_add_secondary_patient_insurance_id_to_patient_insurances.rb │ ├── 20210329185406_create_chat_channels.rb │ ├── 20230801175240_add_is_columns.rb │ ├── 20210421172136_create_patient_devices.rb │ ├── 20221103171501_create_notes_templates.rb │ ├── 20230411172955_create_instruction_blocks.rb │ ├── 20240918152847_modify_adt_provider_actions_table.rb │ ├── 20240905034960_modify_questionnaire_actions_table.rb │ ├── 20220222231336_add_columns_to_action_pathway_week_actions.rb │ ├── 20221103172248_create_notes_template_blocks.rb │ ├── 20221103211246_create_encounter_note_blocks.rb │ ├── 20240628214557_create_questions.rb │ ├── 20210406151635_create_patient_labs.rb │ ├── 20210406151817_create_patient_care_plan_rows.rb │ ├── 20220222214942_add_columns_to_patient_action_group_actions.rb │ ├── 20220608203015_change_fields_on_insurance.rb │ ├── 20240628215218_create_multiple_choice_answers.rb │ ├── 20210719135915_create_action_pathway_weeks.rb │ ├── 20230803194948_create_board_messages.rb │ ├── 20240628215101_create_answers.rb │ ├── 20210723155558_create_assigned_pathway_weeks.rb │ ├── 20220124201313_add_two_factor_to_users.rb │ ├── 20220516060604_add_mrn_sequence.rb │ ├── 20220608164554_create_patient_insurance_types.rb │ ├── 20240529204719_create_action_step_resources.rb │ ├── 20240903102222_create_ltc_facilities.rb │ ├── 20220127190728_create_customers.rb │ ├── 20240305195141_create_questionnaire_resources.rb │ ├── 20240508215047_create_provider_action_resources.rb │ ├── 20210406151921_create_patient_medications.rb │ ├── 20210405133619_add_field_to_users.rb │ ├── 20230127165516_create_assigned_action_resources.rb │ ├── 20230803213135_add_meta_data_to_action_pathway_week_action.rb │ ├── 20220224225417_create_user_privileges.rb │ ├── 20220526213000_create_adt_outbound_logs.rb │ ├── 20230417155254_create_ambulatory_weekly_results.rb │ ├── 20210611204712_create_actions.rb │ ├── 20210616135202_create_patient_action_groups.rb │ ├── 20220128215144_create_customer_selections.rb │ ├── 20231010191214_create_questionnaire_submissions.rb │ ├── 20240221161043_create_questionnaire_actions.rb │ ├── 20210813133740_create_action_resources.rb │ ├── 20230728155213_create_patient_historical_immunizations.rb │ ├── 20230928181004_add_missing_fields.rb │ ├── 20220224225407_create_privileges.rb │ ├── 20240827075446_add_last_first_middle_name_to_patient_insurances.rb │ ├── 20210707164152_create_weight_readings.rb │ ├── 20241013205323_create_action_step_queues.rb │ ├── 20240227205619_create_questionnaire_categories.rb │ ├── 20240530174725_create_action_step_quick_launches.rb │ ├── 20210723154558_create_assigned_pathways.rb │ ├── 20221213173803_create_provider_action_adt_notifications.rb │ ├── 20220225171425_create_customer_user_privileges.rb │ ├── 20220713044705_create_encounter_billing_loggers.rb │ ├── 20220907013732_create_encounter_billing_send_charges_logs.rb │ ├── 20210719140011_create_action_pathway_week_actions.rb │ ├── 20240923213357_create_action_queue_histories.rb │ ├── 20210616135238_create_patient_action_group_actions.rb │ ├── 20240213203556_create_customer_permission_controls.rb │ ├── 20230411170120_create_patient_instructions.rb │ ├── 20240628182048_rename_columns_to_questionnaire.rb │ ├── 20210329185520_create_chat_channel_users.rb │ ├── 20240620154102_create_programs.rb │ ├── 20210713125851_create_resource_items.rb │ ├── 20230726190032_create_patient_forecast_immunizations.rb │ ├── 20240606163838_create_action_step_automations.rb │ ├── 20210707164214_create_blood_pressure_readings.rb │ ├── 20210723154419_create_assigned_actions.rb │ ├── 20220713043822_create_encounter_billings.rb │ ├── 20231103185425_create_lab_readings.rb │ ├── 20240308222229_create_questionnaire_qrs.rb │ ├── 20210421172233_create_patient_device_readings.rb │ ├── 20230906143257_create_questionnaires.rb │ ├── 20240907090004_create_diagnosis_assignment.rb │ ├── 20210518145124_add_devise_trackable_columns_to_users.rb │ └── 20240815203744_create_assignment_histories.rb └── seeds │ ├── patient_devices.rb │ ├── patient_medications.rb │ └── weight_readings.rb ├── config.ru ├── bin ├── delayed_job ├── rake ├── rails └── yarn ├── create-ebs-deploy.sh ├── Rakefile ├── postcss.config.js ├── remove-pid.sh ├── app.json ├── .eslintrc.js └── create-ebs-deploy-mac.sh /Gemfile: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /log/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /storage/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tmp/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /vendor/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /Gemfile.lock: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /lib/assets/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /lib/tasks/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tmp/pids/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /yarn.lock: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /.ruby-version: -------------------------------------------------------------------------------- 1 | 2.7.6 2 | -------------------------------------------------------------------------------- /app/assets/images/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/models/concerns/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /config/application.yml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /public/apple-touch-icon.png: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.rspec: -------------------------------------------------------------------------------- 1 | --require spec_helper 2 | -------------------------------------------------------------------------------- /app/controllers/concerns/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/javascript/components/.keep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # RubyOnRailsHospitalStarField -------------------------------------------------------------------------------- /public/apple-touch-icon-precomposed.png: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/views/layouts/mailer.text.erb: -------------------------------------------------------------------------------- 1 | <%= yield %> 2 | -------------------------------------------------------------------------------- /config/initializers/constants.rb: -------------------------------------------------------------------------------- 1 | APP_NAME="Starfield" 2 | -------------------------------------------------------------------------------- /app/models/sqs_log.rb: -------------------------------------------------------------------------------- 1 | class SqsLog < ApplicationRecord 2 | end 3 | -------------------------------------------------------------------------------- /Procfile: -------------------------------------------------------------------------------- 1 | web: bundle exec puma -C /opt/elasticbeanstalk/config/private/pumaconf.rb 2 | -------------------------------------------------------------------------------- /app/views/pdf_mailer/send_instructions_pdf.txt: -------------------------------------------------------------------------------- 1 | Your recent visit summary is attached. -------------------------------------------------------------------------------- /app/models/place_of_service_code.rb: -------------------------------------------------------------------------------- 1 | class PlaceOfServiceCode < ApplicationRecord 2 | end 3 | -------------------------------------------------------------------------------- /config/initializers/wicked_pdf.rb: -------------------------------------------------------------------------------- 1 | WickedPdf.config = { 2 | print_media_type: true, 3 | } -------------------------------------------------------------------------------- /app/models/company_action_setting.rb: -------------------------------------------------------------------------------- 1 | class CompanyActionSetting < ApplicationRecord 2 | end 3 | -------------------------------------------------------------------------------- /app/assets/config/manifest.js: -------------------------------------------------------------------------------- 1 | //= link_tree ../images 2 | //= link_directory ../stylesheets .css 3 | -------------------------------------------------------------------------------- /app/models/adt_inbound_notification.rb: -------------------------------------------------------------------------------- 1 | class AdtInboundNotification < ApplicationRecord 2 | end 3 | -------------------------------------------------------------------------------- /app/models/board_message.rb: -------------------------------------------------------------------------------- 1 | class BoardMessage < ApplicationRecord 2 | belongs_to :user 3 | end 4 | -------------------------------------------------------------------------------- /app/models/follow_up_date.rb: -------------------------------------------------------------------------------- 1 | class FollowUpDate < ApplicationRecord 2 | belongs_to :user 3 | end 4 | -------------------------------------------------------------------------------- /app/models/patient_insurance_type.rb: -------------------------------------------------------------------------------- 1 | class PatientInsuranceType < ApplicationRecord 2 | 3 | end 4 | -------------------------------------------------------------------------------- /app/models/recurring_action.rb: -------------------------------------------------------------------------------- 1 | class RecurringAction < ApplicationRecord 2 | belongs_to :actionable 3 | end 4 | -------------------------------------------------------------------------------- /app/models/glucose_reading.rb: -------------------------------------------------------------------------------- 1 | class GlucoseReading < ApplicationRecord 2 | belongs_to :synced_account 3 | end 4 | -------------------------------------------------------------------------------- /app/models/patient_ndiis_account.rb: -------------------------------------------------------------------------------- 1 | class PatientNdiisAccount < ApplicationRecord 2 | belongs_to :user 3 | end 4 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /app/models/instruction_block.rb: -------------------------------------------------------------------------------- 1 | class InstructionBlock < ApplicationRecord 2 | belongs_to :patient_instruction 3 | end -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # See https://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file 2 | -------------------------------------------------------------------------------- /app/models/encounter_note_block.rb: -------------------------------------------------------------------------------- 1 | class EncounterNoteBlock < ApplicationRecord 2 | belongs_to :encounter_note 3 | end 4 | -------------------------------------------------------------------------------- /spec/factories/patient_instructions.rb: -------------------------------------------------------------------------------- 1 | FactoryBot.define do 2 | factory :patient_instruction do 3 | 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /app/assets/stylesheets/application/layout/layout.scss: -------------------------------------------------------------------------------- 1 | .main-content { 2 | padding-left: 120px; 3 | margin-left: -18px; 4 | } 5 | -------------------------------------------------------------------------------- /app/assets/stylesheets/application/reports/user_data.scss: -------------------------------------------------------------------------------- 1 | .user-data-table { 2 | padding-left: 30px; 3 | margin-left: -18px; 4 | } -------------------------------------------------------------------------------- /app/models/option.rb: -------------------------------------------------------------------------------- 1 | class Option < ApplicationRecord 2 | belongs_to :question 3 | 4 | validates_presence_of :title 5 | end 6 | -------------------------------------------------------------------------------- /spec/factories/place_of_service_codes.rb: -------------------------------------------------------------------------------- 1 | FactoryBot.define do 2 | factory :place_of_service_code do 3 | 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /app/assets/images/device.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/device.png -------------------------------------------------------------------------------- /app/assets/images/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/logo.png -------------------------------------------------------------------------------- /app/models/customer_selection.rb: -------------------------------------------------------------------------------- 1 | class CustomerSelection < ApplicationRecord 2 | belongs_to :user 3 | belongs_to :customer 4 | end 5 | -------------------------------------------------------------------------------- /app/models/encounter1500_information.rb: -------------------------------------------------------------------------------- 1 | class Encounter1500Information < ApplicationRecord 2 | belongs_to :encounter_billing 3 | end 4 | -------------------------------------------------------------------------------- /app/models/questionnaire_action.rb: -------------------------------------------------------------------------------- 1 | class QuestionnaireAction < ApplicationRecord 2 | belongs_to :questionnaire_submission 3 | end 4 | -------------------------------------------------------------------------------- /spec/factories/instruction_note_blocks.rb: -------------------------------------------------------------------------------- 1 | FactoryBot.define do 2 | factory :instruction_note_block do 3 | 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /app/assets/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/favicon.ico -------------------------------------------------------------------------------- /app/assets/images/spinner1.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/spinner1.gif -------------------------------------------------------------------------------- /app/models/encounter_claim_information.rb: -------------------------------------------------------------------------------- 1 | class EncounterClaimInformation < ApplicationRecord 2 | belongs_to :encounter_billing 3 | end 4 | -------------------------------------------------------------------------------- /app/models/patient_note.rb: -------------------------------------------------------------------------------- 1 | class PatientNote < ApplicationRecord 2 | belongs_to :user 3 | 4 | validates :note, presence: true 5 | end 6 | -------------------------------------------------------------------------------- /app/assets/images/cgm_report.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/cgm_report.png -------------------------------------------------------------------------------- /app/assets/images/email-email.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/email-email.png -------------------------------------------------------------------------------- /app/assets/images/email-head1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/email-head1.png -------------------------------------------------------------------------------- /app/assets/images/email-head2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/email-head2.png -------------------------------------------------------------------------------- /app/assets/images/email-head3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/email-head3.png -------------------------------------------------------------------------------- /app/assets/images/email-head4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/email-head4.png -------------------------------------------------------------------------------- /app/assets/images/email-head5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/email-head5.png -------------------------------------------------------------------------------- /app/assets/images/email-head6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/email-head6.png -------------------------------------------------------------------------------- /app/assets/images/email-head7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/email-head7.png -------------------------------------------------------------------------------- /app/assets/images/email-head8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/email-head8.png -------------------------------------------------------------------------------- /app/assets/images/email-head9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/email-head9.png -------------------------------------------------------------------------------- /app/assets/images/email-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/email-logo.png -------------------------------------------------------------------------------- /app/assets/images/menu-chat.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/menu-chat.png -------------------------------------------------------------------------------- /app/assets/images/menu-labs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/menu-labs.png -------------------------------------------------------------------------------- /app/assets/images/menu-track.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/menu-track.png -------------------------------------------------------------------------------- /app/assets/images/pencil_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/pencil_grey.png -------------------------------------------------------------------------------- /app/assets/images/small-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/small-logo.png -------------------------------------------------------------------------------- /app/assets/images/sort-plain.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/sort-plain.png -------------------------------------------------------------------------------- /app/assets/images/splash-wide.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/splash-wide.png -------------------------------------------------------------------------------- /app/assets/images/sync-device.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/sync-device.png -------------------------------------------------------------------------------- /app/models/action_queue_history.rb: -------------------------------------------------------------------------------- 1 | class ActionQueueHistory < ApplicationRecord 2 | belongs_to :action_queue 3 | belongs_to :user 4 | end 5 | -------------------------------------------------------------------------------- /app/models/multiple_choice_answer.rb: -------------------------------------------------------------------------------- 1 | class MultipleChoiceAnswer < ApplicationRecord 2 | belongs_to :answer 3 | belongs_to :option 4 | end 5 | -------------------------------------------------------------------------------- /spec/factories/customer_permissions.rb: -------------------------------------------------------------------------------- 1 | FactoryBot.define do 2 | factory :customer_permission do 3 | name { "MyString" } 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/factories/options.rb: -------------------------------------------------------------------------------- 1 | FactoryBot.define do 2 | factory :option do 3 | title { "MyString" } 4 | question { nil } 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /app/assets/fonts/Quicksand-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/fonts/Quicksand-Bold.ttf -------------------------------------------------------------------------------- /app/assets/images/chat_rev_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/chat_rev_icon.png -------------------------------------------------------------------------------- /app/assets/images/menu-my-data.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/menu-my-data.png -------------------------------------------------------------------------------- /app/assets/images/plain_hexagon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/plain_hexagon.png -------------------------------------------------------------------------------- /app/assets/images/track-glucose.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/track-glucose.png -------------------------------------------------------------------------------- /app/assets/images/track-weight.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/track-weight.png -------------------------------------------------------------------------------- /app/javascript/components/PrivilegesContext.tsx: -------------------------------------------------------------------------------- 1 | import { createContext } from "react"; 2 | export const PrivilegesContext = createContext({}); 3 | -------------------------------------------------------------------------------- /app/javascript/images/plusIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/javascript/images/plusIcon.png -------------------------------------------------------------------------------- /lib/tasks/get_sqs_messages.rake: -------------------------------------------------------------------------------- 1 | namespace :get do 2 | task sqs_messages: :environment do 3 | ProcessSqsMessageRead.new().call 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /.prettierr.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | semi: true, 3 | trailingComma: "all", 4 | singleQuote: true, 5 | printWidth: 120, 6 | tabWidth: 2, 7 | }; 8 | -------------------------------------------------------------------------------- /app/assets/fonts/Quicksand-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/fonts/Quicksand-Light.ttf -------------------------------------------------------------------------------- /app/assets/fonts/Quicksand-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/fonts/Quicksand-Medium.ttf -------------------------------------------------------------------------------- /app/assets/fonts/Quicksand-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/fonts/Quicksand-Regular.ttf -------------------------------------------------------------------------------- /app/assets/images/chat_close_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/chat_close_icon.png -------------------------------------------------------------------------------- /app/assets/images/create-channel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/create-channel.png -------------------------------------------------------------------------------- /app/assets/images/email-getstarted.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/email-getstarted.png -------------------------------------------------------------------------------- /app/assets/images/email-password.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/email-password.png -------------------------------------------------------------------------------- /app/assets/images/flip_icon_c_to_p.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/flip_icon_c_to_p.png -------------------------------------------------------------------------------- /app/assets/images/flip_icon_p_to_c.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/flip_icon_p_to_c.png -------------------------------------------------------------------------------- /app/assets/images/menu-care-plan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/menu-care-plan.png -------------------------------------------------------------------------------- /app/assets/images/menu-medications.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/menu-medications.png -------------------------------------------------------------------------------- /app/assets/images/sort-ascending.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/sort-ascending.png -------------------------------------------------------------------------------- /app/assets/images/sort-descending.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/sort-descending.png -------------------------------------------------------------------------------- /app/assets/images/starfield_logo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/starfield_logo.gif -------------------------------------------------------------------------------- /app/models/assignment_history.rb: -------------------------------------------------------------------------------- 1 | class AssignmentHistory < ApplicationRecord 2 | belongs_to :loggable, polymorphic: true 3 | belongs_to :user 4 | end 5 | -------------------------------------------------------------------------------- /app/models/provider_action_resource.rb: -------------------------------------------------------------------------------- 1 | class ProviderActionResource < ApplicationRecord 2 | belongs_to :action 3 | belongs_to :resource_item 4 | end 5 | -------------------------------------------------------------------------------- /spec/factories/patient_lists.rb: -------------------------------------------------------------------------------- 1 | FactoryBot.define do 2 | factory :patient_list do 3 | owner { nil } 4 | name { "MyString" } 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /spec/factories/patient_notes.rb: -------------------------------------------------------------------------------- 1 | FactoryBot.define do 2 | factory :patient_note do 3 | user { nil } 4 | note { "MyString" } 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /app/assets/fonts/Quicksand-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/fonts/Quicksand-SemiBold.ttf -------------------------------------------------------------------------------- /app/assets/images/menu-minus-circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/menu-minus-circle.png -------------------------------------------------------------------------------- /app/assets/images/new_large_loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/new_large_loading.gif -------------------------------------------------------------------------------- /app/assets/images/plain_hexagon_tiny.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/plain_hexagon_tiny.png -------------------------------------------------------------------------------- /app/assets/images/providers_inactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/providers_inactive.png -------------------------------------------------------------------------------- /app/assets/images/the_wall_icon_grey.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/the_wall_icon_grey.png -------------------------------------------------------------------------------- /app/models/application_record.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class ApplicationRecord < ActiveRecord::Base 4 | self.abstract_class = true 5 | end 6 | -------------------------------------------------------------------------------- /app/models/questionnaire_resource.rb: -------------------------------------------------------------------------------- 1 | class QuestionnaireResource < ApplicationRecord 2 | belongs_to :questionnaire 3 | belongs_to :resource_item 4 | end 5 | -------------------------------------------------------------------------------- /app/assets/images/patient_reports_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/patient_reports_icon.png -------------------------------------------------------------------------------- /app/assets/images/plain_hexagon_black.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/plain_hexagon_black.png -------------------------------------------------------------------------------- /app/assets/images/plain_hexagon_red_dot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/plain_hexagon_red_dot.png -------------------------------------------------------------------------------- /app/assets/images/track-blood-pressure.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/track-blood-pressure.png -------------------------------------------------------------------------------- /db/migrate/20220209174223_drop_labs_table.rb: -------------------------------------------------------------------------------- 1 | class DropLabsTable < ActiveRecord::Migration[6.0] 2 | def change 3 | drop_table :patient_labs 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/factories/action_pathways.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | FactoryBot.define do 4 | factory :action_pathway do 5 | name { '' } 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /spec/factories/customer.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | FactoryBot.define do 4 | factory :customer do 5 | name { 'Test Pharmacy' } 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /app/assets/images/chat_rev_icon_new_msgs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/chat_rev_icon_new_msgs.png -------------------------------------------------------------------------------- /app/assets/images/nav_icons/nav_chat_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/nav_icons/nav_chat_icon.png -------------------------------------------------------------------------------- /app/assets/images/nav_icons/nav_hie_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/nav_icons/nav_hie_icon.png -------------------------------------------------------------------------------- /app/models/notes_template_block.rb: -------------------------------------------------------------------------------- 1 | class NotesTemplateBlock < ApplicationRecord 2 | belongs_to :notes_template 3 | 4 | default_scope { order(order: :asc) } 5 | end 6 | -------------------------------------------------------------------------------- /app/views/guided_questionnaires/expired_qr.html.erb: -------------------------------------------------------------------------------- 1 | <%= react_component("guided_questionnaires/ExpiredQr", { 2 | logo_src: image_url('logo_starfield_health.svg') 3 | }) %> -------------------------------------------------------------------------------- /spec/factories/multiple_choice_answers.rb: -------------------------------------------------------------------------------- 1 | FactoryBot.define do 2 | factory :multiple_choice_answer do 3 | answer { nil } 4 | option { nil } 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /spec/models/answer_spec.rb: -------------------------------------------------------------------------------- 1 | require 'rails_helper' 2 | 3 | RSpec.describe Answer, type: :model do 4 | pending "add some examples to (or delete) #{__FILE__}" 5 | end 6 | -------------------------------------------------------------------------------- /spec/models/option_spec.rb: -------------------------------------------------------------------------------- 1 | require 'rails_helper' 2 | 3 | RSpec.describe Option, type: :model do 4 | pending "add some examples to (or delete) #{__FILE__}" 5 | end 6 | -------------------------------------------------------------------------------- /app/assets/images/add_new_user_to_chat_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/add_new_user_to_chat_icon.png -------------------------------------------------------------------------------- /app/assets/images/chat_icon_with_orange_line.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/chat_icon_with_orange_line.png -------------------------------------------------------------------------------- /app/assets/images/nav_icons/nav_catalog_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/nav_icons/nav_catalog_icon.png -------------------------------------------------------------------------------- /app/assets/images/nav_icons/nav_queue_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/nav_icons/nav_queue_icon.png -------------------------------------------------------------------------------- /app/assets/images/patient_reports_white_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/patient_reports_white_icon.png -------------------------------------------------------------------------------- /app/assets/images/plain_hexagon_black_tiny.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/plain_hexagon_black_tiny.png -------------------------------------------------------------------------------- /app/assets/images/starfield_logo_transparent.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/starfield_logo_transparent.gif -------------------------------------------------------------------------------- /app/channels/application_cable/channel.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module ApplicationCable 4 | class Channel < ActionCable::Channel::Base 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /app/views/devise/mailer/password_change.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @resource.email %>!

2 | 3 |

We're contacting you to notify you that your password has been changed.

4 | -------------------------------------------------------------------------------- /config/spring.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | Spring.watch( 4 | '.ruby-version', 5 | '.rbenv-vars', 6 | 'tmp/restart.txt', 7 | 'tmp/caching-dev.txt' 8 | ) 9 | -------------------------------------------------------------------------------- /spec/factories/questions.rb: -------------------------------------------------------------------------------- 1 | FactoryBot.define do 2 | factory :question do 3 | title { "MyString" } 4 | type { "" } 5 | questionnaire { nil } 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /spec/factories/recurring_actions.rb: -------------------------------------------------------------------------------- 1 | FactoryBot.define do 2 | factory :recurring_action do 3 | active { false } 4 | assigned_actionable { nil } 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /spec/models/question_spec.rb: -------------------------------------------------------------------------------- 1 | require 'rails_helper' 2 | 3 | RSpec.describe Question, type: :model do 4 | pending "add some examples to (or delete) #{__FILE__}" 5 | end 6 | -------------------------------------------------------------------------------- /app/assets/images/nav_icons/nav_care_plan_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/nav_icons/nav_care_plan_icon.png -------------------------------------------------------------------------------- /app/assets/images/nav_icons/nav_customers_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/nav_icons/nav_customers_icon.png -------------------------------------------------------------------------------- /app/assets/images/nav_icons/nav_patients_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/nav_icons/nav_patients_icon.png -------------------------------------------------------------------------------- /app/assets/images/nav_icons/nav_settings_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/nav_icons/nav_settings_icon.png -------------------------------------------------------------------------------- /app/models/adt_provider_action.rb: -------------------------------------------------------------------------------- 1 | class AdtProviderAction < ApplicationRecord 2 | belongs_to :assigned_pathway_week_action 3 | belongs_to :adt_patient_notification 4 | end 5 | -------------------------------------------------------------------------------- /app/models/patient_action_group_action.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class PatientActionGroupAction < ApplicationRecord 4 | belongs_to :patient_action_group 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220225171317_drop_user_privileges.rb: -------------------------------------------------------------------------------- 1 | class DropUserPrivileges < ActiveRecord::Migration[6.0] 2 | def change 3 | drop_table :user_privileges 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/factories/action_categories.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | FactoryBot.define do 4 | factory :action_category do 5 | name { 'MyString' } 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /spec/factories/encounter_billing_send_charges_logs.rb: -------------------------------------------------------------------------------- 1 | FactoryBot.define do 2 | factory :encounter_billing_send_charges_log do 3 | encounter_billing { nil } 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/factories/encounter_note_blocks.rb: -------------------------------------------------------------------------------- 1 | FactoryBot.define do 2 | factory :encounter_note_block do 3 | encounter_notes { nil } 4 | note { "MyString" } 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /app/assets/images/nav_icons/nav_add_patient_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/nav_icons/nav_add_patient_icon.png -------------------------------------------------------------------------------- /app/channels/application_cable/connection.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module ApplicationCable 4 | class Connection < ActionCable::Connection::Base 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /app/models/action_pathway_week_action.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class ActionPathwayWeekAction < ApplicationRecord 4 | belongs_to :action_pathway_week 5 | 6 | end 7 | -------------------------------------------------------------------------------- /app/models/patient_lab.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class PatientLab < ApplicationRecord 4 | belongs_to :user 5 | default_scope { order('created_at DESC') } 6 | end 7 | -------------------------------------------------------------------------------- /spec/factories/chat_channels.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | FactoryBot.define do 4 | factory :chat_channel do 5 | name { 'MyString' } 6 | user 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /spec/factories/patient_action_groups.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | FactoryBot.define do 4 | factory :patient_action_group do 5 | name { 'MyString' } 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /spec/factories/questionnaire_resources.rb: -------------------------------------------------------------------------------- 1 | FactoryBot.define do 2 | factory :questionnaire_resource do 3 | questionnaire { nil } 4 | resource_item { nil } 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /app/assets/images/add_new_user_to_chat_patient_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/add_new_user_to_chat_patient_icon.png -------------------------------------------------------------------------------- /app/assets/images/nav_icons/nav_patient_lists_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CharmingMonkeyDev/RubyOnRailsHospitalStarField/HEAD/app/assets/images/nav_icons/nav_patient_lists_icon.png -------------------------------------------------------------------------------- /app/mailers/application_mailer.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class ApplicationMailer < ActionMailer::Base 4 | default from: 'from@example.com' 5 | layout 'mailer' 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20220224172107_drop_pharmacy_group_table.rb: -------------------------------------------------------------------------------- 1 | class DropPharmacyGroupTable < ActiveRecord::Migration[6.0] 2 | def change 3 | drop_table :pharmacy_groups 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220610195753_add_facilily_npi.rb: -------------------------------------------------------------------------------- 1 | class AddFacililyNpi < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :customers, :facility_npi, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20240702073918_add_accepted_to_answers.rb: -------------------------------------------------------------------------------- 1 | class AddAcceptedToAnswers < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :answers, :accepted, :boolean 4 | end 5 | end -------------------------------------------------------------------------------- /spec/factories/assigned_action_resources.rb: -------------------------------------------------------------------------------- 1 | FactoryBot.define do 2 | factory :assigned_action_resource do 3 | assigned_action { nil } 4 | resource_item { nil } 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /spec/factories/customer_selections.rb: -------------------------------------------------------------------------------- 1 | FactoryBot.define do 2 | factory :customer_selection do 3 | user { nil } 4 | customer { nil } 5 | do_not_ask { false } 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /spec/models/questionnaire_qr_spec.rb: -------------------------------------------------------------------------------- 1 | require 'rails_helper' 2 | 3 | RSpec.describe QuestionnaireQr, type: :model do 4 | pending "add some examples to (or delete) #{__FILE__}" 5 | end 6 | -------------------------------------------------------------------------------- /app/models/customer_default_privilege.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class CustomerDefaultPrivilege < ApplicationRecord 4 | belongs_to :customer 5 | belongs_to :privilege 6 | end -------------------------------------------------------------------------------- /config.ru: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # This file is used by Rack-based servers to start the application. 4 | 5 | require_relative 'config/environment' 6 | 7 | run Rails.application 8 | -------------------------------------------------------------------------------- /config/webpack/test.js: -------------------------------------------------------------------------------- 1 | process.env.NODE_ENV = process.env.NODE_ENV || 'development' 2 | 3 | const environment = require('./environment') 4 | 5 | module.exports = environment.toWebpackConfig() 6 | -------------------------------------------------------------------------------- /db/migrate/20211013203014_add_locked_at_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddLockedAtToUsers < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :users, :locked_at, :datetime 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20221012170402_add_terms_to_user.rb: -------------------------------------------------------------------------------- 1 | class AddTermsToUser < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :users, :terms, :boolean, default:false 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20240508165957_add_category_to_actions.rb: -------------------------------------------------------------------------------- 1 | class AddCategoryToActions < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :actions, :category, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/models/place_of_service_code_spec.rb: -------------------------------------------------------------------------------- 1 | require 'rails_helper' 2 | 3 | RSpec.describe PlaceOfServiceCode, type: :model do 4 | pending "add some examples to (or delete) #{__FILE__}" 5 | end 6 | -------------------------------------------------------------------------------- /spec/models/questionnaire_action_spec.rb: -------------------------------------------------------------------------------- 1 | require 'rails_helper' 2 | 3 | RSpec.describe QuestionnaireAction, type: :model do 4 | pending "add some examples to (or delete) #{__FILE__}" 5 | end 6 | -------------------------------------------------------------------------------- /app/jobs/process_ndm_reports_job.rb: -------------------------------------------------------------------------------- 1 | class ProcessNdmReportsJob < ApplicationJob 2 | queue_as :default 3 | 4 | def perform(attributes) 5 | ProcessNdmReports.new(attributes).call 6 | end 7 | end -------------------------------------------------------------------------------- /app/models/customer_user_privilege.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class CustomerUserPrivilege < ApplicationRecord 4 | belongs_to :customer_user 5 | belongs_to :privilege 6 | end 7 | -------------------------------------------------------------------------------- /app/models/patient_care_plan_row.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class PatientCarePlanRow < ApplicationRecord 4 | belongs_to :user 5 | default_scope { order('created_at DESC') } 6 | end 7 | -------------------------------------------------------------------------------- /app/models/patient_list.rb: -------------------------------------------------------------------------------- 1 | class PatientList < ApplicationRecord 2 | belongs_to :owner, class_name: 'User' 3 | has_and_belongs_to_many :patients, class_name: 'User', dependent: :destroy 4 | end 5 | -------------------------------------------------------------------------------- /config/webpack/production.js: -------------------------------------------------------------------------------- 1 | process.env.NODE_ENV = process.env.NODE_ENV || 'production' 2 | 3 | const environment = require('./environment') 4 | 5 | module.exports = environment.toWebpackConfig() 6 | -------------------------------------------------------------------------------- /db/migrate/20220307131438_remove_is_admin_from_user.rb: -------------------------------------------------------------------------------- 1 | class RemoveIsAdminFromUser < ActiveRecord::Migration[6.0] 2 | def change 3 | remove_column :customer_users, :is_admin 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220516062017_add_mrn_number_to_patient.rb: -------------------------------------------------------------------------------- 1 | class AddMrnNumberToPatient < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :users, :mrn_number, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220608213651_add_npi_field_on_users.rb: -------------------------------------------------------------------------------- 1 | class AddNpiFieldOnUsers < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :users, :provider_npi_number, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220608215756_remove_status_from_customers.rb: -------------------------------------------------------------------------------- 1 | class RemoveStatusFromCustomers < ActiveRecord::Migration[6.0] 2 | def change 3 | remove_column :customers, :status 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20221021195841_add_adt_time_stamp.rb: -------------------------------------------------------------------------------- 1 | class AddAdtTimeStamp < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :users, :adt_notif_modified_at, :datetime 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20230614145651_add_last_contact_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddLastContactToUsers < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :users, :last_contact, :date 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/factories/patient_devices.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | FactoryBot.define do 4 | factory :patient_device do 5 | user 6 | identifier { 'DEVICEIDENTIFIER' } 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /spec/factories/resource_items.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | FactoryBot.define do 4 | factory :resource_item do 5 | name { 'MyString' } 6 | pdf { 'MyString' } 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /spec/models/multiple_choice_answer_spec.rb: -------------------------------------------------------------------------------- 1 | require 'rails_helper' 2 | 3 | RSpec.describe MultipleChoiceAnswer, type: :model do 4 | pending "add some examples to (or delete) #{__FILE__}" 5 | end 6 | -------------------------------------------------------------------------------- /spec/models/questionnaire_category_spec.rb: -------------------------------------------------------------------------------- 1 | require 'rails_helper' 2 | 3 | RSpec.describe QuestionnaireCategory, type: :model do 4 | pending "add some examples to (or delete) #{__FILE__}" 5 | end 6 | -------------------------------------------------------------------------------- /spec/models/questionnaire_resource_spec.rb: -------------------------------------------------------------------------------- 1 | require 'rails_helper' 2 | 3 | RSpec.describe QuestionnaireResource, type: :model do 4 | pending "add some examples to (or delete) #{__FILE__}" 5 | end 6 | -------------------------------------------------------------------------------- /app/jobs/create_live_actions_job.rb: -------------------------------------------------------------------------------- 1 | class CreateLiveActionsJob < ApplicationJob 2 | queue_as :default 3 | 4 | def perform(attributes) 5 | CreateLiveActions.new(attributes).call 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /app/models/eb_send_charges_log.rb: -------------------------------------------------------------------------------- 1 | class EbSendChargesLog < ApplicationRecord 2 | belongs_to :encounter_billing 3 | belongs_to :user, optional: true #this is the provider who submit charges 4 | end 5 | -------------------------------------------------------------------------------- /app/models/pharmacy_group.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class PharmacyGroup < ApplicationRecord 4 | has_many :users 5 | has_many :resource_items 6 | has_many :action_pathways 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20220131233051_remove_phone_number_from_user.rb: -------------------------------------------------------------------------------- 1 | class RemovePhoneNumberFromUser < ActiveRecord::Migration[6.0] 2 | def change 3 | remove_column :users, :phone_number 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220201153120_change_null_constrain.rb: -------------------------------------------------------------------------------- 1 | class ChangeNullConstrain < ActiveRecord::Migration[6.0] 2 | def change 3 | change_column_null :users, :pharmacy_group_id, true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20240712192629_add_position_to_questions.rb: -------------------------------------------------------------------------------- 1 | class AddPositionToQuestions < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :questions, :position, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/factories/questionnaire_actions.rb: -------------------------------------------------------------------------------- 1 | FactoryBot.define do 2 | factory :questionnaire_action do 3 | assigned_pathway_week_action { nil } 4 | questionnaire_submission { nil } 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /app/views/devise/sessions/new.html.erb: -------------------------------------------------------------------------------- 1 | <%= react_component("Login", { 2 | csrfToken: form_authenticity_token, 3 | logo_src: image_url('logo.png'), 4 | button_src: image_url('login_button.svg') 5 | }) %> -------------------------------------------------------------------------------- /bin/delayed_job: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | 3 | require File.expand_path(File.join(File.dirname(__FILE__), '..', 'config', 'environment')) 4 | require 'delayed/command' 5 | Delayed::Command.new(ARGV).daemonize 6 | -------------------------------------------------------------------------------- /config/webpack/.modernizrrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | options: ["setClasses"], 3 | "feature-detects": [ 4 | "test/css/flexbox", 5 | "test/es6/promises", 6 | "test/serviceworker" 7 | ] 8 | }; 9 | -------------------------------------------------------------------------------- /db/migrate/20220120174642_change_name_field_to_first_name.rb: -------------------------------------------------------------------------------- 1 | class ChangeNameFieldToFirstName < ActiveRecord::Migration[6.0] 2 | def change 3 | rename_column :users, :name, :first_name 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220307131427_remove_is_admin_from_customer_user.rb: -------------------------------------------------------------------------------- 1 | class RemoveIsAdminFromCustomerUser < ActiveRecord::Migration[6.0] 2 | def change 3 | remove_column :users, :is_admin 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220518183414_add_uniq_id_on_channels.rb: -------------------------------------------------------------------------------- 1 | class AddUniqIdOnChannels < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :chat_channels, :uniq_channel_id, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220524050058_add_user_invitation_type.rb: -------------------------------------------------------------------------------- 1 | class AddUserInvitationType < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :users, :user_invitation_type, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20221125193930_add_term_timestamp_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddTermTimestampToUsers < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :users, :terms_timestamp, :datetime 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20240905100046_add_ltc_facility_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddLtcFacilityToUsers < ActiveRecord::Migration[6.0] 2 | def change 3 | add_reference :users, :ltc_facility, foreign_key: true 4 | end 5 | end -------------------------------------------------------------------------------- /spec/factories/action_resources.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | FactoryBot.define do 4 | factory :action_resource do 5 | patient_action { nil } 6 | resource_item { nil } 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /spec/factories/ambulatory_weekly_results.rb: -------------------------------------------------------------------------------- 1 | FactoryBot.define do 2 | factory :ambulatory_weekly_result do 3 | results { "" } 4 | user { nil } 5 | week_start { "2023-04-17" } 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /app/helpers/general_helper.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | module GeneralHelper 4 | def to_snake_case(text) 5 | text.gsub(/([a-z])([A-Z])/, '\1_\2').gsub(/[\s-]+/, '_').downcase 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /app/models/assigned_action_resource.rb: -------------------------------------------------------------------------------- 1 | class AssignedActionResource < ApplicationRecord 2 | belongs_to :assigned_action 3 | belongs_to :resource_item 4 | default_scope -> {includes(:resource_item)} 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20210322173822_add_name_to_users.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class AddNameToUsers < ActiveRecord::Migration[6.0] 4 | def change 5 | add_column :users, :name, :string 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20220131214945_add_phone_number_to_customers.rb: -------------------------------------------------------------------------------- 1 | class AddPhoneNumberToCustomers < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :customers, :phone_number, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220204152030_add_signature_on_customer_user.rb: -------------------------------------------------------------------------------- 1 | class AddSignatureOnCustomerUser < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :customer_users, :signature, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/factories/action_pathway_weeks.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | FactoryBot.define do 4 | factory :action_pathway_week do 5 | action_pathway { nil } 6 | name { 'MyString' } 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /app/assets/images/arrow_down.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app/models/action_category.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class ActionCategory < ApplicationRecord 4 | has_many :patient_actions 5 | default_scope { order('sort ASC') } 6 | has_many :actions 7 | end 8 | -------------------------------------------------------------------------------- /app/views/devise/passwords/new.html.erb: -------------------------------------------------------------------------------- 1 | <%= react_component("ForgotPassword", { 2 | csrfToken: form_authenticity_token, 3 | logo_src: image_url('logo.png'), 4 | button_src: image_url('login_button.svg') 5 | }) %> -------------------------------------------------------------------------------- /create-ebs-deploy.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | bundle package --all 3 | rm ../rails-latest-sf.zip 4 | zip ../rails-latest-sf.zip -r * .[^.]* -x ./node_modules/\* -x .git/\* -x tmp/\* -x log/\* -x public/assets\* -x public/pack\* 5 | -------------------------------------------------------------------------------- /db/migrate/20220224170721_remove_pharmacy_group_id_from_users.rb: -------------------------------------------------------------------------------- 1 | class RemovePharmacyGroupIdFromUsers < ActiveRecord::Migration[6.0] 2 | def change 3 | remove_column :users, :pharmacy_group_id 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220613162309_add_federal_tax_id_on_customers.rb: -------------------------------------------------------------------------------- 1 | class AddFederalTaxIdOnCustomers < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :customers, :federal_tax_id, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20230327163516_change_date_of_birth_column_to_date.rb: -------------------------------------------------------------------------------- 1 | class ChangeDateOfBirthColumnToDate < ActiveRecord::Migration[6.0] 2 | def change 3 | change_column :users, :date_of_birth, :date 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20230913153251_remove_not_null_constraint.rb: -------------------------------------------------------------------------------- 1 | class RemoveNotNullConstraint < ActiveRecord::Migration[6.0] 2 | def change 3 | change_column_null :eb_send_charges_logs, :user_id, true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/factories/assigned_pathway_weeks.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | FactoryBot.define do 4 | factory :assigned_pathway_week do 5 | assigned_pathway { nil } 6 | name { 'MyString' } 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /spec/factories/customer_permission_controls.rb: -------------------------------------------------------------------------------- 1 | FactoryBot.define do 2 | factory :customer_permission_control do 3 | customer { nil } 4 | customer_permission { "" } 5 | permitted { false } 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /spec/factories/patient_labs.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | FactoryBot.define do 4 | factory :patient_lab do 5 | user 6 | lab_type { 'a1c' } 7 | value { 'MyString' } 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/assets/images/arrow_up.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app/assets/stylesheets/application/patient/patient_mobile_error.scss: -------------------------------------------------------------------------------- 1 | .patient-error-container { 2 | @include modal-container; 3 | @media (max-width: 600px) { 4 | width: 50%; 5 | text-align: center; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /app/models/privilege.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class Privilege < ApplicationRecord 4 | has_many :customer_user_privileges 5 | has_many :customer_users, through: :customer_user_privileges 6 | end 7 | -------------------------------------------------------------------------------- /app/views/devise/passwords/edit.html.erb: -------------------------------------------------------------------------------- 1 | <%= react_component("ChangePassword", { 2 | csrfToken: form_authenticity_token, 3 | logo_src: image_url('logo.png'), 4 | button_src: image_url('login_button.svg') 5 | }) %> -------------------------------------------------------------------------------- /db/migrate/20210405160455_add_gender_to_users.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class AddGenderToUsers < ActiveRecord::Migration[6.0] 4 | def change 5 | add_column :users, :gender, :string 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20220512194417_add_active_on_chat_channels.rb: -------------------------------------------------------------------------------- 1 | class AddActiveOnChatChannels < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :chat_channels, :active, :boolean, default: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20230921183233_add_business_phone_number_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddBusinessPhoneNumberToUsers < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :users, :business_phone_number, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20240214222607_add_display_on_tablet.rb: -------------------------------------------------------------------------------- 1 | class AddDisplayOnTablet < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :questionnaires, :display_on_tablet, :boolean, default: false 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20240701173401_add_end_timing_to_program_actions.rb: -------------------------------------------------------------------------------- 1 | class AddEndTimingToProgramActions < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :program_actions, :end_timing, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20240911144653_add_customer_id_to_ltc_facilities.rb: -------------------------------------------------------------------------------- 1 | class AddCustomerIdToLtcFacilities < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :ltc_facilities, :customer_id, :bigint 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20241023095634_add_cgm_enabled_to_user.rb: -------------------------------------------------------------------------------- 1 | class AddCgmEnabledToUser < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :users, :cgm_enabled, :boolean, default: false, null: false 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/factories/chat_channel_users.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | FactoryBot.define do 4 | factory :chat_channel_user do 5 | user 6 | channel 7 | chat_user { 'MyString' } 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/views/devise/invitations/edit.html.erb: -------------------------------------------------------------------------------- 1 | <%= react_component("SetInvitationPassword", { 2 | csrfToken: form_authenticity_token, 3 | logo_src: image_url('logo.png'), 4 | button_src: image_url('login_button.svg') 5 | }) %> -------------------------------------------------------------------------------- /db/migrate/20210322173329_add_role_to_users_table.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class AddRoleToUsersTable < ActiveRecord::Migration[6.0] 4 | def change 5 | add_column :users, :role, :integer 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20210611150032_remove_care_plan_table.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class RemoveCarePlanTable < ActiveRecord::Migration[6.0] 4 | def change 5 | drop_table :patient_care_plan_rows 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20210614191021_add_icon_to_actions.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class AddIconToActions < ActiveRecord::Migration[6.0] 4 | def change 5 | add_column :patient_actions, :icon, :string 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20220216155610_add_customer_to_patient_actions.rb: -------------------------------------------------------------------------------- 1 | class AddCustomerToPatientActions < ActiveRecord::Migration[6.0] 2 | def change 3 | add_reference :patient_actions, :customer, foreign_key: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20230221201822_add_assinged_at_pathway_week.rb: -------------------------------------------------------------------------------- 1 | class AddAssingedAtPathwayWeek < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :assigned_pathway_week_actions, :assigned_at, :datetime 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20230912185223_add_published_at_on_questionnaires.rb: -------------------------------------------------------------------------------- 1 | class AddPublishedAtOnQuestionnaires < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :questionnaires, :published_at, :datetime 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20240816153338_add_notes_to_assignment_histories_table.rb: -------------------------------------------------------------------------------- 1 | class AddNotesToAssignmentHistoriesTable < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :assignment_histories, :notes, :text 4 | end 5 | end -------------------------------------------------------------------------------- /app/assets/images/category_icons/hospital.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /db/migrate/20220524211310_rename_user_inivitation_column.rb: -------------------------------------------------------------------------------- 1 | class RenameUserInivitationColumn < ActiveRecord::Migration[6.0] 2 | def change 3 | rename_column :users, :user_invitation_type, :user_creation_type 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20221026164803_add_addendum_to_encounter_notes.rb: -------------------------------------------------------------------------------- 1 | class AddAddendumToEncounterNotes < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :encounter_notes, :addendum, :bool, default: false 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20230918171909_add_deleted_at_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddDeletedAtToUsers < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :users, :deleted_at, :datetime 4 | add_index :users, :deleted_at 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20231211154645_create_sqs_logs.rb: -------------------------------------------------------------------------------- 1 | class CreateSqsLogs < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :sqs_logs do |t| 4 | t.jsonb :message 5 | t.timestamps 6 | end 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /db/migrate/20240425061628_action_schema_changes.rb: -------------------------------------------------------------------------------- 1 | class ActionSchemaChanges < ActiveRecord::Migration[6.0] 2 | def change 3 | rename_column :actions, :subtext, :subject 4 | add_column :actions, :status, :string 5 | end 6 | end -------------------------------------------------------------------------------- /db/migrate/20240521170611_add_end_timing_to_action_recurrences.rb: -------------------------------------------------------------------------------- 1 | class AddEndTimingToActionRecurrences < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :action_recurrences, :end_timing, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20240827185221_add_insured_to_patient_insurances.rb: -------------------------------------------------------------------------------- 1 | class AddInsuredToPatientInsurances < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :patient_insurances, :insured_user_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/factories/patient_medications.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | FactoryBot.define do 4 | factory :patient_medication do 5 | user 6 | name { 'MyString' } 7 | value { 'MyString' } 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /config/initializers/mime_types.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | # Be sure to restart your server when you modify this file. 3 | 4 | # Add new mime types for use in respond_to blocks: 5 | # Mime::Type.register "text/richtext", :rtf 6 | -------------------------------------------------------------------------------- /db/migrate/20210324175730_add_invite_token_to_users.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class AddInviteTokenToUsers < ActiveRecord::Migration[6.0] 4 | def change 5 | add_column :users, :invite_token, :string 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20210518141946_add_phone_number_to_users.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class AddPhoneNumberToUsers < ActiveRecord::Migration[6.0] 4 | def change 5 | add_column :users, :phone_number, :string 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20220526213428_add_adt_notification_on_users.rb: -------------------------------------------------------------------------------- 1 | class AddAdtNotificationOnUsers < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :users, :adt_notifications_turned_on, :boolean, default: false 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220605141530_add_referenced_on_users.rb: -------------------------------------------------------------------------------- 1 | class AddReferencedOnUsers < ActiveRecord::Migration[6.0] 2 | def change 3 | add_reference :adt_outbound_logs, :requested_by, foreign_key: { to_table: :users} 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220906205120_add_customer_id_on_encounter_billing.rb: -------------------------------------------------------------------------------- 1 | class AddCustomerIdOnEncounterBilling < ActiveRecord::Migration[6.0] 2 | def change 3 | add_reference :encounter_billings, :customer, index: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20230911155637_add_place_of_service_code_on_customers.rb: -------------------------------------------------------------------------------- 1 | class AddPlaceOfServiceCodeOnCustomers < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :customers, :place_of_service_code, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20231215030802_add_archive_column_to_ndm_reports.rb: -------------------------------------------------------------------------------- 1 | class AddArchiveColumnToNdmReports < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :ndm_reports, :is_archived, :boolean, :default => false 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/factories/action_pathway_week_actions.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | FactoryBot.define do 4 | factory :action_pathway_week_action do 5 | patient_action { nil } 6 | action_pathway_week { nil } 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /spec/factories/answers.rb: -------------------------------------------------------------------------------- 1 | FactoryBot.define do 2 | factory :answer do 3 | questionnaire { nil } 4 | question { nil } 5 | answer_text { "MyText" } 6 | assigned_to { 1 } 7 | answered_by { 1 } 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /spec/factories/assigned_pathways.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | FactoryBot.define do 4 | factory :assigned_pathway do 5 | action_pathway { nil } 6 | user { nil } 7 | name { 'MyString' } 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /spec/factories/patient_action_group_actions.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | FactoryBot.define do 4 | factory :patient_action_group_action do 5 | patient_action_group { nil } 6 | patient_action { nil } 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /spec/requests/customer_permissions_spec.rb: -------------------------------------------------------------------------------- 1 | require 'rails_helper' 2 | 3 | RSpec.describe "CustomerPermissions", type: :request do 4 | describe "GET /index" do 5 | pending "add some examples (or delete) #{__FILE__}" 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /app/assets/stylesheets/patient_providers.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the patient_providers controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: https://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /db/migrate/20210324175445_add_date_of_birth_to_users.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class AddDateOfBirthToUsers < ActiveRecord::Migration[6.0] 4 | def change 5 | add_column :users, :date_of_birth, :datetime 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20210506200604_add_issued_to_patient_labs.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class AddIssuedToPatientLabs < ActiveRecord::Migration[6.0] 4 | def change 5 | add_column :patient_labs, :issued, :string 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20210518143305_add_is_active_to_users.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class AddIsActiveToUsers < ActiveRecord::Migration[6.0] 4 | def change 5 | add_column :users, :is_active, :boolean, default: true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20220216161459_remove_pharmacy_group_from_patient_actions.rb: -------------------------------------------------------------------------------- 1 | class RemovePharmacyGroupFromPatientActions < ActiveRecord::Migration[6.0] 2 | def change 3 | remove_reference :patient_actions, :pharmacy_group 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220222213233_remove_patient_action_from_assigned_actions.rb: -------------------------------------------------------------------------------- 1 | class RemovePatientActionFromAssignedActions < ActiveRecord::Migration[6.0] 2 | def change 3 | remove_column :assigned_actions, :patient_action_id 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220224170343_remove_pharmacy_group_id_from_resource_items.rb: -------------------------------------------------------------------------------- 1 | class RemovePharmacyGroupIdFromResourceItems < ActiveRecord::Migration[6.0] 2 | def change 3 | remove_column :resource_items, :pharmacy_group_id 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/factories/questionnaire_categories.rb: -------------------------------------------------------------------------------- 1 | FactoryBot.define do 2 | factory :questionnaire_category do 3 | customer { nil } 4 | display_name { "MyString" } 5 | db_name { "MyString" } 6 | is_default { false } 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /spec/factories/questionnaire_qrs.rb: -------------------------------------------------------------------------------- 1 | FactoryBot.define do 2 | factory :questionnaire_qr do 3 | uuid { "" } 4 | customer { nil } 5 | patient_id { 1 } 6 | assign_by_id { 1 } 7 | invalid { false } 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /spec/requests/guided_questionnaires_spec.rb: -------------------------------------------------------------------------------- 1 | require 'rails_helper' 2 | 3 | RSpec.describe "GuidedQuestionnaires", type: :request do 4 | describe "GET /index" do 5 | pending "add some examples (or delete) #{__FILE__}" 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20210608133257_add_last_contact_at_to_users.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class AddLastContactAtToUsers < ActiveRecord::Migration[6.0] 4 | def change 5 | add_column :users, :last_contact_at, :datetime 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20220223165249_remove_action_pathway_id_from_assigned_pathway.rb: -------------------------------------------------------------------------------- 1 | class RemoveActionPathwayIdFromAssignedPathway < ActiveRecord::Migration[6.0] 2 | def change 3 | remove_column :assigned_pathways, :action_pathway_id 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220720164357_rename_billings_to_billing.rb: -------------------------------------------------------------------------------- 1 | class RenameBillingsToBilling < ActiveRecord::Migration[6.0] 2 | def change 3 | rename_column :encounter_billing_loggers, :encounter_billings_id, :encounter_billing_id 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20240916083545_rename_country_to_county_on_patient_insurance.rb: -------------------------------------------------------------------------------- 1 | class RenameCountryToCountyOnPatientInsurance < ActiveRecord::Migration[6.0] 2 | def change 3 | rename_column :patient_insurances, :country, :county 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/requests/questionnaire_categories_spec.rb: -------------------------------------------------------------------------------- 1 | require 'rails_helper' 2 | 3 | RSpec.describe "QuestionnaireCategories", type: :request do 4 | describe "GET /index" do 5 | pending "add some examples (or delete) #{__FILE__}" 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /app/assets/stylesheets/action_step_automation.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the ActionStepAutomation controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: https://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/assets/stylesheets/action_step_quick_launch.scss: -------------------------------------------------------------------------------- 1 | // Place all the styles related to the ActionStepQuickLaunch controller here. 2 | // They will automatically be included in application.css. 3 | // You can use Sass (SCSS) here: https://sass-lang.com/ 4 | -------------------------------------------------------------------------------- /app/helpers/log_helper.rb: -------------------------------------------------------------------------------- 1 | module LogHelper 2 | def log_info(message) 3 | Rails.logger.info(message) 4 | end 5 | 6 | def log_errors(e) 7 | Rails.logger.error(e) 8 | Rails.logger.error(e.backtrace.join("\n")) 9 | end 10 | end -------------------------------------------------------------------------------- /app/views/admin/reports/vax_aggregate_report.csv.erb: -------------------------------------------------------------------------------- 1 | <% headers = @headers %> 2 | <%= CSV.generate_line headers -%> 3 | <%- @data.each do |datum| -%> 4 | <%= CSV.generate_line( 5 | @fields.map { |field| datum[field]} 6 | ) -%> 7 | <%-end-%> -------------------------------------------------------------------------------- /db/migrate/20210518125136_add_is_admin_to_users_table.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class AddIsAdminToUsersTable < ActiveRecord::Migration[6.0] 4 | def change 5 | add_column :users, :is_admin, :boolean, default: false 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20210719133111_add_sort_to_action_categories.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class AddSortToActionCategories < ActiveRecord::Migration[6.0] 4 | def change 5 | add_column :action_categories, :sort, :integer 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20220720162614_add_reference_on_encounter_notes.rb: -------------------------------------------------------------------------------- 1 | class AddReferenceOnEncounterNotes < ActiveRecord::Migration[6.0] 2 | def change 3 | add_reference :encounter_notes, :encounter_billing, null: false, foreign_key: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20230728214646_add_source_to_assigned_pathway_week_actions.rb: -------------------------------------------------------------------------------- 1 | class AddSourceToAssignedPathwayWeekActions < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :assigned_pathway_week_actions, :source, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20240829071615_add_is_secondary_to_patient_insurances.rb: -------------------------------------------------------------------------------- 1 | class AddIsSecondaryToPatientInsurances < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :patient_insurances, :is_secondary, :boolean, default: false 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/seeds/patient_devices.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | if PatientDevice.count.zero? 4 | User.where(role: 'patient').each do |user| 5 | PatientDevice.create!(identifier: ENV['TEST_DEVICE_IDENTIFIER'], user_id: user.id) 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /app/views/patients/patient_invited.html.erb: -------------------------------------------------------------------------------- 1 | <%= react_component("patients/PatientInvite", { 2 | csrfToken: form_authenticity_token, 3 | logo_src: image_url('logo.png'), 4 | button_src: image_url('login_button.svg'), 5 | patient: @patient 6 | }) %> -------------------------------------------------------------------------------- /app/views/patients/undo_email.html.erb: -------------------------------------------------------------------------------- 1 | <%= react_component("patient-profile/UndoEmail", { 2 | csrfToken: form_authenticity_token, 3 | logo_src: image_url('logo.png'), 4 | button_src: image_url('login_button.svg'), 5 | patient: @patient 6 | }) %> -------------------------------------------------------------------------------- /app/views/two_factor_auth/new.html.erb: -------------------------------------------------------------------------------- 1 | <%= react_component("two_factor_auth/New", { 2 | csrfToken: form_authenticity_token, 3 | user_id: current_user.id, 4 | logo_src: image_url('logo.png'), 5 | button_src: image_url('login_button.svg') 6 | }) %> -------------------------------------------------------------------------------- /db/migrate/20210506155643_add_patient_identifier_to_users.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class AddPatientIdentifierToUsers < ActiveRecord::Migration[6.0] 4 | def change 5 | add_column :users, :patient_identifier, :string 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20211013203440_add_lockable_to_devise.rb: -------------------------------------------------------------------------------- 1 | class AddLockableToDevise < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :users, :failed_attempts, :integer, default: 0 4 | add_column :users, :unlock_token, :string 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20230822164313_add_created_by_to_customer_users_table.rb: -------------------------------------------------------------------------------- 1 | class AddCreatedByToCustomerUsersTable < ActiveRecord::Migration[6.0] 2 | def change 3 | add_reference :customer_users, :created_by, foreign_key: { to_table: :users } 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /app/javascript/channels/index.js: -------------------------------------------------------------------------------- 1 | // Load all the channels within this directory and all subdirectories. 2 | // Channel files must be named *_channel.js. 3 | 4 | const channels = require.context(".", true, /_channel\.js$/); 5 | channels.keys().forEach(channels); 6 | -------------------------------------------------------------------------------- /app/models/questionnaire_qr.rb: -------------------------------------------------------------------------------- 1 | class QuestionnaireQr < ApplicationRecord 2 | belongs_to :customer 3 | belongs_to :patient, class_name: "User", foreign_key: 'patient_id' 4 | belongs_to :assigned_by, class_name: "User", foreign_key: 'assigned_by_id' 5 | end 6 | -------------------------------------------------------------------------------- /app/views/patients/undo_password.html.erb: -------------------------------------------------------------------------------- 1 | <%= react_component("patient-profile/UndoPassword", { 2 | csrfToken: form_authenticity_token, 3 | logo_src: image_url('logo.png'), 4 | button_src: image_url('login_button.svg'), 5 | patient: @patient 6 | }) %> -------------------------------------------------------------------------------- /config/cable.yml: -------------------------------------------------------------------------------- 1 | development: 2 | adapter: async 3 | 4 | test: 5 | adapter: test 6 | 7 | production: 8 | adapter: redis 9 | url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %> 10 | channel_prefix: nd_pharm_starfield_production 11 | -------------------------------------------------------------------------------- /db/migrate/20220120174532_add_middle_last_name_fields_to_user.rb: -------------------------------------------------------------------------------- 1 | class AddMiddleLastNameFieldsToUser < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :users, :middle_name, :string 4 | add_column :users, :last_name, :string 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20231017193112_add_resource_id_to_questionnaires_table.rb: -------------------------------------------------------------------------------- 1 | class AddResourceIdToQuestionnairesTable < ActiveRecord::Migration[6.0] 2 | def change 3 | add_reference :questionnaires, :resource_item, null: true, foreign_key: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /spec/factories/actions.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | FactoryBot.define do 4 | factory :patient_action do 5 | action_category { nil } 6 | text { 'MyText' } 7 | subtext { 'MyText' } 8 | recurring { false } 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /spec/factories/weight_readings.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | FactoryBot.define do 4 | factory :weight_reading do 5 | date_recorded { '2021-07-07 11:41:52' } 6 | reading_value { 'MyString' } 7 | user { nil } 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/assets/images/md-filter.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /app/models/action_step_resource.rb: -------------------------------------------------------------------------------- 1 | class ActionStepResource < ApplicationRecord 2 | belongs_to :action_step 3 | belongs_to :resource_item 4 | 5 | def serializable_hash(options = nil) 6 | super(options).merge(resource_item: resource_item) 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /db/migrate/20210427152007_add_notes_to_patient_device_readings.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class AddNotesToPatientDeviceReadings < ActiveRecord::Migration[6.0] 4 | def change 5 | add_column :patient_device_readings, :notes, :text 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20210826145132_add_start_date_to_assigned_pathways.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class AddStartDateToAssignedPathways < ActiveRecord::Migration[6.0] 4 | def change 5 | add_column :assigned_pathways, :start_date, :datetime 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20220204202022_add_coach_id_to_assigned_pathway_week_actions.rb: -------------------------------------------------------------------------------- 1 | class AddCoachIdToAssignedPathwayWeekActions < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :assigned_pathway_week_actions, :assigned_coach_id, :integer 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220722190530_create_cpt_codes.rb: -------------------------------------------------------------------------------- 1 | class CreateCptCodes < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :cpt_codes do |t| 4 | t.timestamps 5 | t.string :name 6 | t.string :code 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20221213172035_add_action_pathway_id_to_assigned_pathways.rb: -------------------------------------------------------------------------------- 1 | class AddActionPathwayIdToAssignedPathways < ActiveRecord::Migration[6.0] 2 | def change 3 | add_reference :assigned_pathways, :action_pathway, null: true, foreign_key: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /app/assets/images/category_icons/landscape.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/views/devise/mailer/confirmation_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Welcome <%= @email %>!

2 | 3 |

You can confirm your account email through the link below:

4 | 5 |

<%= link_to 'Confirm my account', confirmation_url(@resource, confirmation_token: @token) %>

6 | -------------------------------------------------------------------------------- /config/boot.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) 4 | 5 | require 'bundler/setup' # Set up gems listed in the Gemfile. 6 | require 'bootsnap/setup' # Speed up boot time by caching expensive operations. 7 | -------------------------------------------------------------------------------- /db/migrate/20210322201924_add_pharmacy_group_id_to_users.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class AddPharmacyGroupIdToUsers < ActiveRecord::Migration[6.0] 4 | def change 5 | add_reference :users, :pharmacy_group, null: false, foreign_key: true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20210427150817_add_source_to_patient_device_readings.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class AddSourceToPatientDeviceReadings < ActiveRecord::Migration[6.0] 4 | def change 5 | add_column :patient_device_readings, :source, :string 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20210726164529_add_completed_at_to_assigned_actions.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class AddCompletedAtToAssignedActions < ActiveRecord::Migration[6.0] 4 | def change 5 | add_column :assigned_actions, :completed_at, :datetime 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20220207222733_add_status_to_assigned_pathway_week_actions.rb: -------------------------------------------------------------------------------- 1 | class AddStatusToAssignedPathwayWeekActions < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :assigned_pathway_week_actions, :status, :integer, default: "unassigned" 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220222232741_remove_patient_action_from_action_pathway_week_actions.rb: -------------------------------------------------------------------------------- 1 | class RemovePatientActionFromActionPathwayWeekActions < ActiveRecord::Migration[6.0] 2 | def change 3 | remove_column :action_pathway_week_actions, :patient_action_id 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20240420085918_add_archive_column_to_questionnaire_categories.rb: -------------------------------------------------------------------------------- 1 | class AddArchiveColumnToQuestionnaireCategories < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :questionnaire_categories, :is_archived, :boolean, :default => false 4 | end 5 | end -------------------------------------------------------------------------------- /app/javascript/components/utils/PrivilegesHelper.tsx: -------------------------------------------------------------------------------- 1 | export function checkPrivileges(userPrivileges, privilegeName) { 2 | var result = userPrivileges.filter((obj) => { 3 | return obj.name === privilegeName; 4 | }); 5 | return result[0]?.privilege_state || null; 6 | } 7 | -------------------------------------------------------------------------------- /db/migrate/20220207225135_change_assigned_pathway_week_action_status_type_to_string.rb: -------------------------------------------------------------------------------- 1 | class ChangeAssignedPathwayWeekActionStatusTypeToString < ActiveRecord::Migration[6.0] 2 | def change 3 | change_column :assigned_pathway_week_actions, :status, :string 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220309215808_add_tokens_to_synced_accounts.rb: -------------------------------------------------------------------------------- 1 | class AddTokensToSyncedAccounts < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :synced_accounts, :access_token, :string 4 | add_column :synced_accounts, :refresh_token, :string 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20231020211810_add_created_by_id_to_weight_readings_table.rb: -------------------------------------------------------------------------------- 1 | class AddCreatedByIdToWeightReadingsTable < ActiveRecord::Migration[6.0] 2 | def change 3 | add_reference :weight_readings, :created_by, foreign_key: { to_table: :users}, null: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20240213193003_create_customer_permissions.rb: -------------------------------------------------------------------------------- 1 | class CreateCustomerPermissions < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :customer_permissions do |t| 4 | t.string :name 5 | 6 | t.timestamps 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /spec/factories/blood_pressure_readings.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | FactoryBot.define do 4 | factory :blood_pressure_reading do 5 | date_recorded { '2021-07-07 11:42:14' } 6 | reading_value { 'MyString' } 7 | user { nil } 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/models/action_step_queue.rb: -------------------------------------------------------------------------------- 1 | class ActionStepQueue < ApplicationRecord 2 | belongs_to :action_queue 3 | belongs_to :action_step 4 | 5 | enum status: { 6 | "incomplete": "incomplete", 7 | "complete": "complete", 8 | "skipped": "skipped" 9 | } 10 | end 11 | -------------------------------------------------------------------------------- /app/models/chat_channel_user.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class ChatChannelUser < ApplicationRecord 4 | belongs_to :user 5 | belongs_to :chat_channel 6 | 7 | def as_json(options = {}) 8 | options[:include] = %i[user] 9 | super 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20210614125547_add_pharmacy_group_to_actions.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class AddPharmacyGroupToActions < ActiveRecord::Migration[6.0] 4 | def change 5 | add_reference :patient_actions, :pharmacy_group, null: false, foreign_key: true 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20220222221213_remove_patient_action_id_from_patient_action_group_actions.rb: -------------------------------------------------------------------------------- 1 | class RemovePatientActionIdFromPatientActionGroupActions < ActiveRecord::Migration[6.0] 2 | def change 3 | remove_column :patient_action_group_actions, :patient_action_id 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /app/models/action_recurrence.rb: -------------------------------------------------------------------------------- 1 | class ActionRecurrence < ApplicationRecord 2 | belongs_to :action 3 | enum end_timing: { 4 | "after_n_occurences": "after_n_occurences", 5 | "after_program_start_date": "after_program_start_date", 6 | "no_end_date": "no_end_date" 7 | } 8 | end -------------------------------------------------------------------------------- /db/migrate/20220222230848_remove_patient_action_id_from_assigned_pathway_week_actions.rb: -------------------------------------------------------------------------------- 1 | class RemovePatientActionIdFromAssignedPathwayWeekActions < ActiveRecord::Migration[6.0] 2 | def change 3 | remove_column :assigned_pathway_week_actions, :patient_action_id 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20220815215042_add_rendering_prov_field.rb: -------------------------------------------------------------------------------- 1 | class AddRenderingProvField < ActiveRecord::Migration[6.0] 2 | def change 3 | remove_column :encounter_claim_informations, :rendering_provider 4 | add_column :encounter_billings, :rendering_provider, :string 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20220906213757_add_interchange_number.rb: -------------------------------------------------------------------------------- 1 | class AddInterchangeNumber < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :encounter_billings, :interchange_number, :string 4 | add_column :encounter_billings, :transaction_set_number, :string 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20240830093550_add_patient_insurance_id_to_user.rb: -------------------------------------------------------------------------------- 1 | class AddPatientInsuranceIdToUser < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :users, :patient_insurance_id, :bigint 4 | add_column :users, :secondary_patient_insurance_id, :bigint 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /Rakefile: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Add your own tasks in files placed in lib/tasks ending in .rake, 4 | # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. 5 | 6 | require_relative 'config/application' 7 | 8 | Rails.application.load_tasks 9 | -------------------------------------------------------------------------------- /app/javascript/components/styles/useChatStyles.tsx: -------------------------------------------------------------------------------- 1 | import makeStyles from "@mui/styles/makeStyles"; 2 | 3 | export const useChatStyles = () => { 4 | const theStyles = makeStyles(() => ({})); 5 | const classes = theStyles(); 6 | 7 | return { 8 | classes, 9 | }; 10 | }; 11 | -------------------------------------------------------------------------------- /app/models/lab_reading.rb: -------------------------------------------------------------------------------- 1 | class LabReading < ApplicationRecord 2 | validates_presence_of :reading_type, :reading_value, :date_recorded, :user_id 3 | 4 | scope :by_type, ->(reading_type) { where(reading_type: reading_type) } 5 | scope :latest, ->() { order(created_at: 'desc' ) } 6 | end 7 | -------------------------------------------------------------------------------- /config/initializers/filter_parameter_logging.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Be sure to restart your server when you modify this file. 4 | 5 | # Configure sensitive parameters which will be filtered from the log file. 6 | Rails.application.config.filter_parameters += [:password] 7 | -------------------------------------------------------------------------------- /config/webpack/loaders/typescript.js: -------------------------------------------------------------------------------- 1 | const PnpWebpackPlugin = require('pnp-webpack-plugin') 2 | 3 | module.exports = { 4 | test: /\.tsx?(\.erb)?$/, 5 | use: [ 6 | { 7 | loader: 'ts-loader', 8 | options: PnpWebpackPlugin.tsLoaderOptions() 9 | } 10 | ] 11 | } 12 | -------------------------------------------------------------------------------- /db/migrate/20210826191922_add_start_date_to_assigne_pathway_week_actions.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class AddStartDateToAssignePathwayWeekActions < ActiveRecord::Migration[6.0] 4 | def change 5 | add_column :assigned_pathway_weeks, :start_date, :datetime 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20220203211445_add_uuid_to_user.rb: -------------------------------------------------------------------------------- 1 | class AddUuidToUser < ActiveRecord::Migration[6.0] 2 | enable_extension 'pgcrypto' unless extension_enabled?('pgcrypto') 3 | 4 | def change 5 | add_column :users, :uuid, :uuid, default: "gen_random_uuid()", null: false 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /spec/factories/assigned_actions.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | FactoryBot.define do 4 | factory :assigned_action do 5 | patient_action { nil } 6 | text { 'MyText' } 7 | subtext { 'MyText' } 8 | recurring { false } 9 | user { nil } 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /app/assets/images/category_icons/note.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/views/customer_selections/new.html.erb: -------------------------------------------------------------------------------- 1 | <%= react_component("customer_selections/New", { 2 | csrfToken: form_authenticity_token, 3 | user_id: current_user.id, 4 | logo_src: image_url('logo.png'), 5 | button_src: image_url('login_button.svg'), 6 | customers: @customers 7 | }) %> -------------------------------------------------------------------------------- /db/migrate/20230727154333_add_is_manual_cpt_code_to_encounter_claims_information.rb: -------------------------------------------------------------------------------- 1 | class AddIsManualCptCodeToEncounterClaimsInformation < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :encounter_claim_informations, :is_manual_cpt_code, :boolean, default: false 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /postcss.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | plugins: [ 3 | require('postcss-import'), 4 | require('postcss-flexbugs-fixes'), 5 | require('postcss-preset-env')({ 6 | autoprefixer: { 7 | flexbox: 'no-2009' 8 | }, 9 | stage: 3 10 | }) 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /app/assets/images/category_icons/chatbubble.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /app/assets/images/category_icons/controlpoint.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /bin/rake: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | 4 | begin 5 | load File.expand_path('spring', __dir__) 6 | rescue LoadError => e 7 | raise unless e.message.include?('spring') 8 | end 9 | require_relative '../config/boot' 10 | require 'rake' 11 | Rake.application.run 12 | -------------------------------------------------------------------------------- /db/migrate/20210726132054_add_patient_action_group_id_to_assigned_actions.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class AddPatientActionGroupIdToAssignedActions < ActiveRecord::Migration[6.0] 4 | def change 5 | add_column :assigned_actions, :patient_action_group_id, :integer 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20230315164023_add_chat_notify_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddChatNotifyToUsers < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :users, :chat_notify, :boolean, default: true 4 | add_column :users, :opt_out_key, :uuid, default: "gen_random_uuid()", null: false 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20231020170729_add_created_by_id_to_blood_pressure_readings_table.rb: -------------------------------------------------------------------------------- 1 | class AddCreatedByIdToBloodPressureReadingsTable < ActiveRecord::Migration[6.0] 2 | def change 3 | add_reference :blood_pressure_readings, :created_by, foreign_key: { to_table: :users}, null: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20231024180614_add_created_by_id_to_patient_device_readings_table.rb: -------------------------------------------------------------------------------- 1 | class AddCreatedByIdToPatientDeviceReadingsTable < ActiveRecord::Migration[6.0] 2 | def change 3 | add_reference :patient_device_readings, :created_by, foreign_key: { to_table: :users}, null: true 4 | end 5 | end 6 | -------------------------------------------------------------------------------- /db/migrate/20210322201828_create_pharmacy_groups.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class CreatePharmacyGroups < ActiveRecord::Migration[6.0] 4 | def change 5 | create_table :pharmacy_groups do |t| 6 | t.string :name 7 | 8 | t.timestamps 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20210726164739_add_completed_at_to_assigned_pathway_week_actions.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class AddCompletedAtToAssignedPathwayWeekActions < ActiveRecord::Migration[6.0] 4 | def change 5 | add_column :assigned_pathway_week_actions, :completed_at, :datetime 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20220223172234_add_customer_to_action_to_resource_items.rb: -------------------------------------------------------------------------------- 1 | class AddCustomerToActionToResourceItems < ActiveRecord::Migration[6.0] 2 | def change 3 | add_reference :resource_items, :customer, index: true 4 | change_column_null :resource_items, :pharmacy_group_id, true 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20240420090729_add_questionnaire_category_id_column_to_questionnaires.rb: -------------------------------------------------------------------------------- 1 | class AddQuestionnaireCategoryIdColumnToQuestionnaires < ActiveRecord::Migration[6.0] 2 | def change 3 | add_reference :questionnaires, :questionnaire_category, foreign_key: true, index: true, null: true 4 | end 5 | end -------------------------------------------------------------------------------- /db/migrate/20241023200012_create_place_of_service_codes.rb: -------------------------------------------------------------------------------- 1 | class CreatePlaceOfServiceCodes < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :place_of_service_codes do |t| 4 | t.string :code 5 | t.string :name 6 | 7 | t.timestamps 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /spec/factories/user.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | FactoryBot.define do 4 | factory :user do 5 | email { "dev+#{rand(1..10_000)}@codelation.com" } 6 | password { 'secret' } 7 | first_name { 'First' } 8 | last_name { 'Last' } 9 | role {"patient"} 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /app/assets/images/category_icons/security.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/models/action_resource.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class ActionResource < ApplicationRecord 4 | belongs_to :patient_action 5 | belongs_to :resource_item 6 | 7 | def serializable_hash(options = nil) 8 | super(options).merge(resource_item: resource_item) 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20210611193547_create_action_categories.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class CreateActionCategories < ActiveRecord::Migration[6.0] 4 | def change 5 | create_table :action_categories do |t| 6 | t.string :name 7 | 8 | t.timestamps 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /app/assets/images/transfer.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/models/patient_device.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class PatientDevice < ApplicationRecord 4 | belongs_to :user 5 | has_many :patient_device_readings 6 | 7 | def as_json(options = {}) 8 | options[:include] = 9 | %i[patient_device_readings] 10 | super 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20210810170141_add_password_update_token_to_users.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class AddPasswordUpdateTokenToUsers < ActiveRecord::Migration[6.0] 4 | def change 5 | add_column :users, :password_update_token, :string 6 | add_column :users, :email_update_token, :string 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /spec/factories/patient_device_readings.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | FactoryBot.define do 4 | factory :patient_device_reading do 5 | patient_device 6 | reading_type { 'MyString' } 7 | reading_value { 'Test Value' } 8 | date_recorded { '2021-04-21 12:22:34' } 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /app/javascript/channels/consumer.js: -------------------------------------------------------------------------------- 1 | // Action Cable provides the framework to deal with WebSockets in Rails. 2 | // You can generate new channels where WebSocket features live using the `rails generate channel` command. 3 | 4 | import { createConsumer } from "@rails/actioncable"; 5 | 6 | export default createConsumer(); 7 | -------------------------------------------------------------------------------- /app/models/cpt_code.rb: -------------------------------------------------------------------------------- 1 | class CptCode < ApplicationRecord 2 | def serializable_hash(options = nil) 3 | super(options).merge( 4 | sanitized_name: sanitized_name 5 | ) 6 | end 7 | 8 | private 9 | 10 | def sanitized_name 11 | "#{name}(#{code})" 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/views/layouts/mailer.html.erb: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 8 | 9 | 10 | 11 | <%= yield %> 12 | 13 | 14 | -------------------------------------------------------------------------------- /db/migrate/20230629183605_create_follow_up_dates.rb: -------------------------------------------------------------------------------- 1 | class CreateFollowUpDates < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :follow_up_dates do |t| 4 | t.references :user, null: false, foreign_key: true 5 | t.date :next_date 6 | t.timestamps 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20230703214517_create_patient_notes.rb: -------------------------------------------------------------------------------- 1 | class CreatePatientNotes < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :patient_notes do |t| 4 | t.references :user, null: false, foreign_key: true 5 | t.string :note 6 | 7 | t.timestamps 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20240628214844_create_options.rb: -------------------------------------------------------------------------------- 1 | class CreateOptions < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :options do |t| 4 | t.string :title, null: false 5 | t.references :question, null: false, foreign_key: true 6 | 7 | t.timestamps 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /lib/reporting_api_auth.rb: -------------------------------------------------------------------------------- 1 | require 'jwt' 2 | 3 | module ReportingApiAuth 4 | def self.generate_token 5 | secret_key = ENV["NDM_API_SECRET"] 6 | current_timestamp = Time.now.to_i 7 | payload = { timestamp: current_timestamp } 8 | token = JWT.encode(payload, secret_key, 'HS256') 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /app/assets/images/category_icons/account.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /db/migrate/20220607182831_create_adt_inbound_notifications.rb: -------------------------------------------------------------------------------- 1 | class CreateAdtInboundNotifications < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :adt_inbound_notifications do |t| 4 | t.string :file_name 5 | t.string :file_content 6 | t.timestamps 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20230612195356_create_patient_lists.rb: -------------------------------------------------------------------------------- 1 | class CreatePatientLists < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :patient_lists do |t| 4 | t.references :owner, null: false, foreign_key: {to_table: :users} 5 | t.string :name 6 | 7 | t.timestamps 8 | end 9 | end 10 | end -------------------------------------------------------------------------------- /db/migrate/20230911200835_add_field_on_encounter_insurance.rb: -------------------------------------------------------------------------------- 1 | class AddFieldOnEncounterInsurance < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :encounter_insurance_informations, :service_partner_id, :string 4 | add_column :encounter_insurance_informations, :claim_filing_code, :string 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20231204145128_create_ndm_reports.rb: -------------------------------------------------------------------------------- 1 | class CreateNdmReports < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :ndm_reports do |t| 4 | t.string :status, default: "processing" 5 | t.jsonb :data 6 | t.jsonb :issues 7 | 8 | t.timestamps 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /spec/factories/customer_users.rb: -------------------------------------------------------------------------------- 1 | FactoryBot.define do 2 | factory :customer_user do 3 | user { nil } 4 | customer { nil } 5 | assigned_at { "2022-01-27 13:13:49" } 6 | accepted_at { "2022-01-27 13:13:49" } 7 | cancelled_at { "2022-01-27 13:13:49" } 8 | status { "MyString" } 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /app/assets/images/category_icons/hourglass.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/models/customer_permission_control.rb: -------------------------------------------------------------------------------- 1 | class CustomerPermissionControl < ApplicationRecord 2 | belongs_to :customer 3 | belongs_to :customer_permission 4 | 5 | def serializable_hash(options = nil) 6 | super(options).merge( 7 | permission_name: self.customer_permission.name, 8 | ) 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20220830205807_add_uuid_on_encounter_billings.rb: -------------------------------------------------------------------------------- 1 | class AddUuidOnEncounterBillings < ActiveRecord::Migration[6.0] 2 | enable_extension 'pgcrypto' unless extension_enabled?('pgcrypto') 3 | 4 | def change 5 | add_column :encounter_billings, :uuid, :uuid, default: "gen_random_uuid()", null: false 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20230613144113_create_join_table_patient_list_user.rb: -------------------------------------------------------------------------------- 1 | class CreateJoinTablePatientListUser < ActiveRecord::Migration[6.0] 2 | def change 3 | create_join_table :patient_lists, :users do |t| 4 | # t.index [:patient_list_id, :user_id] 5 | # t.index [:user_id, :patient_list_id] 6 | end 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /db/migrate/20240508160813_add_customer_id_to_action_categories.rb: -------------------------------------------------------------------------------- 1 | class AddCustomerIdToActionCategories < ActiveRecord::Migration[6.0] 2 | def change 3 | add_reference :action_categories, :customer, foreign_key: true, null: true 4 | add_column :action_categories, :is_archived, :boolean, default: false 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /app/assets/images/category_icons/bar.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /db/migrate/20240422070643_create_action_steps.rb: -------------------------------------------------------------------------------- 1 | class CreateActionSteps < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :action_steps do |t| 4 | t.string :title 5 | t.string :subtext 6 | t.string :icon 7 | t.references :action 8 | 9 | t.timestamps 10 | end 11 | end 12 | end -------------------------------------------------------------------------------- /db/migrate/20240702144954_remove_old_questions_and_old_answers_from_questionnaire.rb: -------------------------------------------------------------------------------- 1 | class RemoveOldQuestionsAndOldAnswersFromQuestionnaire < ActiveRecord::Migration[6.0] 2 | def change 3 | remove_column :questionnaires, :old_questions, :json 4 | remove_column :questionnaire_submissions, :old_answers, :json 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20240814180014_change_assigned_provider_actions_table_columns.rb: -------------------------------------------------------------------------------- 1 | class ChangeAssignedProviderActionsTableColumns < ActiveRecord::Migration[6.0] 2 | def change 3 | change_column_default :assigned_provider_actions, :status, "active" 4 | remove_column :assigned_provider_actions, :patient_program_id 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /spec/factories/assigned_pathway_week_actions.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | FactoryBot.define do 4 | factory :assigned_pathway_week_action do 5 | patient_action { nil } 6 | assigned_pathway_week { nil } 7 | text { 'MyText' } 8 | subtext { 'MyText' } 9 | recurring { false } 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /app/assets/images/search.svg: -------------------------------------------------------------------------------- 1 | 14 | -------------------------------------------------------------------------------- /config/initializers/application_controller_renderer.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | # Be sure to restart your server when you modify this file. 3 | 4 | # ActiveSupport::Reloader.to_prepare do 5 | # ApplicationController.renderer.defaults.merge!( 6 | # http_host: 'example.org', 7 | # https: false 8 | # ) 9 | # end 10 | -------------------------------------------------------------------------------- /config/initializers/cookies_serializer.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Be sure to restart your server when you modify this file. 4 | 5 | # Specify a serializer for the signed and encrypted cookie jars. 6 | # Valid options are :json, :marshal, and :hybrid. 7 | Rails.application.config.action_dispatch.cookies_serializer = :json 8 | -------------------------------------------------------------------------------- /db/migrate/20220223174428_change_pharmacy_group_id_to_customer_id_on_patient_action_pathways.rb: -------------------------------------------------------------------------------- 1 | class ChangePharmacyGroupIdToCustomerIdOnPatientActionPathways < ActiveRecord::Migration[6.0] 2 | def change 3 | remove_column :action_pathways, :pharmacy_group_id 4 | add_column :action_pathways, :customer_id, :bigint 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20220309202338_create_synced_accounts.rb: -------------------------------------------------------------------------------- 1 | class CreateSyncedAccounts < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :synced_accounts do |t| 4 | t.references :user, null: false, foreign_key: true 5 | t.string :account_type, null: false 6 | t.timestamps 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /db/migrate/20210719135544_create_action_pathways.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class CreateActionPathways < ActiveRecord::Migration[6.0] 4 | def change 5 | create_table :action_pathways do |t| 6 | t.string :name 7 | t.references :pharmacy_group 8 | 9 | t.timestamps 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20220223173349_change_pharmacy_group_id_to_customer_id_on_patient_action_group.rb: -------------------------------------------------------------------------------- 1 | class ChangePharmacyGroupIdToCustomerIdOnPatientActionGroup < ActiveRecord::Migration[6.0] 2 | def change 3 | remove_column :patient_action_groups, :pharmacy_group_id 4 | add_column :patient_action_groups, :customer_id, :bigint 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20221208213227_create_recurring_actions.rb: -------------------------------------------------------------------------------- 1 | class CreateRecurringActions < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :recurring_actions do |t| 4 | t.boolean :active 5 | t.integer :actionable_id 6 | t.string :actionable_type 7 | 8 | t.timestamps 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20230913143818_add_json_column.rb: -------------------------------------------------------------------------------- 1 | class AddJsonColumn < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :eb_send_charges_logs, :request_json, :jsonb 4 | add_column :eb_send_charges_logs, :validation_response_json, :jsonb 5 | add_column :eb_send_charges_logs, :submission_response_json, :jsonb 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /app/models/patient_action_group.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class PatientActionGroup < ApplicationRecord 4 | belongs_to :customer 5 | has_many :patient_action_group_actions, dependent: :destroy 6 | 7 | def as_json(options = {}) 8 | options[:include] = %i[patient_action_group_actions] 9 | super 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /app/views/devise/mailer/unlock_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @resource.email %>!

2 | 3 |

Your account has been locked due to an excessive number of unsuccessful sign in attempts.

4 | 5 |

Click the link below to unlock your account:

6 | 7 |

<%= link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %>

8 | -------------------------------------------------------------------------------- /bin/rails: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | 4 | begin 5 | load File.expand_path('spring', __dir__) 6 | rescue LoadError => e 7 | raise unless e.message.include?('spring') 8 | end 9 | APP_PATH = File.expand_path('../config/application', __dir__) 10 | require_relative '../config/boot' 11 | require 'rails/commands' 12 | -------------------------------------------------------------------------------- /bin/yarn: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env ruby 2 | # frozen_string_literal: true 3 | 4 | APP_ROOT = File.expand_path('..', __dir__) 5 | Dir.chdir(APP_ROOT) do 6 | exec 'yarnpkg', *ARGV 7 | rescue Errno::ENOENT 8 | warn 'Yarn executable was not detected in the system.' 9 | warn 'Download Yarn at https://yarnpkg.com/en/docs/install' 10 | exit 1 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20220718221129_provider_information_on_encounter_billings.rb: -------------------------------------------------------------------------------- 1 | class ProviderInformationOnEncounterBillings < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :encounter_billings, :provider_name, :string 4 | add_reference :encounter_billings, :created_by, foreign_key: { to_table: :users}, required: false 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20220719162705_create_encounter_notes.rb: -------------------------------------------------------------------------------- 1 | class CreateEncounterNotes < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :encounter_notes do |t| 4 | t.timestamps 5 | t.string :notes, default: "" 6 | t.references :creator, null: false, foreign_key: {to_table: 'users'} 7 | end 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/javascript/packs/server_rendering.js: -------------------------------------------------------------------------------- 1 | // By default, this pack is loaded for server-side rendering. 2 | // It must expose react_ujs as `ReactRailsUJS` and prepare a require context. 3 | var componentRequireContext = require.context("components", true); 4 | var ReactRailsUJS = require("react_ujs"); 5 | ReactRailsUJS.useContext(componentRequireContext); 6 | -------------------------------------------------------------------------------- /db/migrate/20221208213426_add_creation_type_on_assigned_action.rb: -------------------------------------------------------------------------------- 1 | class AddCreationTypeOnAssignedAction < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :assigned_actions, :creation_type, :string, default: "user_creation" 4 | add_column :assigned_pathway_week_actions, :creation_type, :string, default: "user_creation" 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /db/migrate/20230725141638_create_patient_ndiis_accounts.rb: -------------------------------------------------------------------------------- 1 | class CreatePatientNdiisAccounts < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :patient_ndiis_accounts do |t| 4 | t.references :user, null: false, foreign_key: true 5 | t.string :ndiis_patient_id 6 | 7 | t.timestamps 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20240828025549_add_secondary_patient_insurance_id_to_patient_insurances.rb: -------------------------------------------------------------------------------- 1 | class AddSecondaryPatientInsuranceIdToPatientInsurances < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :patient_insurances, :secondary_patient_insurance_id, :bigint 4 | add_index :patient_insurances, :secondary_patient_insurance_id 5 | end 6 | end 7 | -------------------------------------------------------------------------------- /spec/models/customer_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'rails_helper' 4 | 5 | RSpec.describe Customer, type: :model do 6 | describe 'with name' do 7 | it 'should create a customer' do 8 | customer = Customer.create(name: 'Test Customer') 9 | expect(customer.save).to be true 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20210329185406_create_chat_channels.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class CreateChatChannels < ActiveRecord::Migration[6.0] 4 | def change 5 | create_table :chat_channels do |t| 6 | t.string :name 7 | t.references :user, null: false, foreign_key: true 8 | 9 | t.timestamps 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20230801175240_add_is_columns.rb: -------------------------------------------------------------------------------- 1 | class AddIsColumns < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :patient_forecast_immunizations, :defer_date, :date 4 | add_column :patient_forecast_immunizations, :given_date, :date 5 | add_column :patient_forecast_immunizations, :is_deleted, :boolean, default: false 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /app/jobs/application_job.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class ApplicationJob < ActiveJob::Base 4 | # Automatically retry jobs that encountered a deadlock 5 | # retry_on ActiveRecord::Deadlocked 6 | 7 | # Most jobs are safe to ignore if the underlying records are no longer available 8 | # discard_on ActiveJob::DeserializationError 9 | end 10 | -------------------------------------------------------------------------------- /app/views/questionnaire_assignments/submission.html.erb: -------------------------------------------------------------------------------- 1 | <%= react_component("questionnaire_submission/QuestionnaireSubmission", { 2 | QuestionnaireAssignment: @questionnaire_assignment, 3 | csrfToken: form_authenticity_token, 4 | user_id: @questionnaire_assignment.assignment_type == "manual" ? current_user.id : nil, 5 | redirect: @redirect 6 | }) %> 7 | -------------------------------------------------------------------------------- /app/assets/images/category_icons/hand.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/models/encounter_note.rb: -------------------------------------------------------------------------------- 1 | class EncounterNote < ApplicationRecord 2 | belongs_to :encounter_billing 3 | has_many :encounter_note_blocks, dependent: :destroy 4 | 5 | def json 6 | self.attributes.merge({"blocks" => self.blocks}) 7 | end 8 | 9 | def blocks 10 | encounter_note_blocks 11 | end 12 | 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20210421172136_create_patient_devices.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class CreatePatientDevices < ActiveRecord::Migration[6.0] 4 | def change 5 | create_table :patient_devices do |t| 6 | t.references :user, null: false, foreign_key: true 7 | t.string :identifier 8 | 9 | t.timestamps 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20221103171501_create_notes_templates.rb: -------------------------------------------------------------------------------- 1 | class CreateNotesTemplates < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :notes_templates do |t| 4 | t.string :name 5 | t.boolean :archived, default: false 6 | t.references :user, null: false, foreign_key: true 7 | 8 | t.timestamps 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20230411172955_create_instruction_blocks.rb: -------------------------------------------------------------------------------- 1 | class CreateInstructionBlocks < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :instruction_blocks do |t| 4 | t.timestamps 5 | t.belongs_to :patient_instruction, null: false, foreign_key: true 6 | t.string :note 7 | t.integer :order 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20240918152847_modify_adt_provider_actions_table.rb: -------------------------------------------------------------------------------- 1 | class ModifyAdtProviderActionsTable < ActiveRecord::Migration[6.0] 2 | def change 3 | remove_column :adt_provider_actions, :assigned_pathway_week_action_id 4 | 5 | # Add the new foreign key column 6 | add_reference :adt_provider_actions, :action_queue, foreign_key: true 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /app/models/ambulatory_weekly_result.rb: -------------------------------------------------------------------------------- 1 | # 1 week of ambulatory glucose monitoring data ending on "end_date" 2 | class AmbulatoryWeeklyResult < ApplicationRecord 3 | belongs_to :user 4 | validates :data_type, inclusion: { in: %w(average overlay), 5 | message: "%{value} is not a valid data_type for AmbulatoryWeeklyResult" } 6 | validates :results, presence: true 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20240905034960_modify_questionnaire_actions_table.rb: -------------------------------------------------------------------------------- 1 | class ModifyQuestionnaireActionsTable < ActiveRecord::Migration[6.0] 2 | def change 3 | remove_column :questionnaire_actions, :assigned_pathway_week_action_id 4 | 5 | # Add the new foreign key column 6 | add_reference :questionnaire_actions, :action_queue, foreign_key: true 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /app/models/notes_template.rb: -------------------------------------------------------------------------------- 1 | class NotesTemplate < ApplicationRecord 2 | has_many :notes_template_blocks 3 | belongs_to :user 4 | 5 | def as_json(options = {}) 6 | options[:include] = 7 | %i[ 8 | blocks 9 | ] 10 | super 11 | end 12 | 13 | def blocks 14 | notes_template_blocks 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /app/views/devise/mailer/email_changed.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @email %>!

2 | 3 | <% if @resource.try(:unconfirmed_email?) %> 4 |

We're contacting you to notify you that your email is being changed to <%= @resource.unconfirmed_email %>.

5 | <% else %> 6 |

We're contacting you to notify you that your email has been changed to <%= @resource.email %>.

7 | <% end %> 8 | -------------------------------------------------------------------------------- /db/migrate/20220222231336_add_columns_to_action_pathway_week_actions.rb: -------------------------------------------------------------------------------- 1 | class AddColumnsToActionPathwayWeekActions < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :action_pathway_week_actions, :text, :string 4 | add_column :action_pathway_week_actions, :subtext, :string 5 | add_column :action_pathway_week_actions, :recurring, :boolean 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20221103172248_create_notes_template_blocks.rb: -------------------------------------------------------------------------------- 1 | class CreateNotesTemplateBlocks < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :notes_template_blocks do |t| 4 | t.references :notes_template, null: false, foreign_key: true 5 | t.string :note 6 | t.integer :order 7 | 8 | t.timestamps 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20221103211246_create_encounter_note_blocks.rb: -------------------------------------------------------------------------------- 1 | class CreateEncounterNoteBlocks < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :encounter_note_blocks do |t| 4 | t.belongs_to :encounter_note, null: false, foreign_key: true 5 | t.string :note 6 | t.integer :order 7 | 8 | t.timestamps 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20240628214557_create_questions.rb: -------------------------------------------------------------------------------- 1 | class CreateQuestions < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :questions do |t| 4 | t.string :title, null: false 5 | t.string :question_type, null: false 6 | t.references :questionnaire, null: false, foreign_key: true 7 | 8 | t.timestamps 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20210406151635_create_patient_labs.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class CreatePatientLabs < ActiveRecord::Migration[6.0] 4 | def change 5 | create_table :patient_labs do |t| 6 | t.references :user, null: false, foreign_key: true 7 | t.string :lab_type 8 | t.string :value 9 | 10 | t.timestamps 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20210406151817_create_patient_care_plan_rows.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class CreatePatientCarePlanRows < ActiveRecord::Migration[6.0] 4 | def change 5 | create_table :patient_care_plan_rows do |t| 6 | t.references :user, null: false, foreign_key: true 7 | t.text :value 8 | 9 | t.timestamps 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20220222214942_add_columns_to_patient_action_group_actions.rb: -------------------------------------------------------------------------------- 1 | class AddColumnsToPatientActionGroupActions < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :patient_action_group_actions, :text, :string 4 | add_column :patient_action_group_actions, :subtext, :string 5 | add_column :patient_action_group_actions, :recurring, :boolean 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /db/migrate/20220608203015_change_fields_on_insurance.rb: -------------------------------------------------------------------------------- 1 | class ChangeFieldsOnInsurance < ActiveRecord::Migration[6.0] 2 | def change 3 | remove_column :patient_insurances, :account_number 4 | remove_column :patient_insurances, :payor 5 | add_column :patient_insurances, :insurance_type, :string 6 | add_column :patient_insurances, :phone_number, :string 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /db/migrate/20240628215218_create_multiple_choice_answers.rb: -------------------------------------------------------------------------------- 1 | class CreateMultipleChoiceAnswers < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :multiple_choice_answers do |t| 4 | t.references :answer, null: false, foreign_key: true 5 | t.references :option, null: false, foreign_key: true 6 | 7 | t.timestamps 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20210719135915_create_action_pathway_weeks.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class CreateActionPathwayWeeks < ActiveRecord::Migration[6.0] 4 | def change 5 | create_table :action_pathway_weeks do |t| 6 | t.references :action_pathway, null: false, foreign_key: true 7 | t.string :name 8 | 9 | t.timestamps 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20230803194948_create_board_messages.rb: -------------------------------------------------------------------------------- 1 | class CreateBoardMessages < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :board_messages do |t| 4 | t.references :user, null: false, foreign_key: true 5 | t.references :customer, null: false, foreign_key: true 6 | t.string :message 7 | 8 | t.timestamps 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20240628215101_create_answers.rb: -------------------------------------------------------------------------------- 1 | class CreateAnswers < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :answers do |t| 4 | t.references :questionnaire_submission, null: false, foreign_key: true 5 | t.references :question, null: false, foreign_key: true 6 | t.text :answer_text 7 | 8 | t.timestamps 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /lib/tasks/fetch_ndiis_forecast.rake: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'net/sftp' 4 | 5 | namespace :fetch do 6 | task ndiis_forecast: :environment do 7 | 8 | ndiis_linked_users = User.joins(:patient_ndiis_account).distinct 9 | ndiis_linked_users.each do |user| 10 | ProcessNdiisData.new({user_id: user.id}).call 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/assets/images/category_icons/control_point.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/assets/images/category_icons/heart.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/views/guided_questionnaires/tablet_questionnaire.html.erb: -------------------------------------------------------------------------------- 1 | <% user = current_user || @patient %> 2 | 3 | <%= react_component("guided_questionnaires/TabletQuestionnaire", { 4 | questionnaire_assignments: @selected_questionnaires, 5 | csrfToken: form_authenticity_token, 6 | user_id: user&.id, 7 | logo_src: image_url('logo_starfield_health.svg'), 8 | qrId: params[:id], 9 | }) %> -------------------------------------------------------------------------------- /db/migrate/20210723155558_create_assigned_pathway_weeks.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class CreateAssignedPathwayWeeks < ActiveRecord::Migration[6.0] 4 | def change 5 | create_table :assigned_pathway_weeks do |t| 6 | t.references :assigned_pathway, null: false, foreign_key: true 7 | t.string :name 8 | 9 | t.timestamps 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20220124201313_add_two_factor_to_users.rb: -------------------------------------------------------------------------------- 1 | class AddTwoFactorToUsers < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :users, :two_factor_verification_code, :string 4 | add_column :users, :two_factor_verified_at, :datetime 5 | add_column :users, :two_factor_code_sent_at, :datetime 6 | add_column :users, :two_factor_auth_attempts, :integer 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /db/migrate/20220516060604_add_mrn_sequence.rb: -------------------------------------------------------------------------------- 1 | class AddMrnSequence < ActiveRecord::Migration[6.0] 2 | def up 3 | execute <<-SQL 4 | CREATE SEQUENCE users_mrn_id_seq 5 | INCREMENT 1 6 | MINVALUE 1001 7 | MAXVALUE 9999999 8 | START 1001 9 | CYCLE; 10 | SQL 11 | end 12 | 13 | def down 14 | DROP SEQUENCE users_mrn_id_seq; 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /db/migrate/20220608164554_create_patient_insurance_types.rb: -------------------------------------------------------------------------------- 1 | class CreatePatientInsuranceTypes < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :patient_insurance_types do |t| 4 | t.string :insurance_type, null: false 5 | t.boolean :display_on_ui, null: false 6 | t.integer :sort_order, null: false 7 | t.timestamps 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20240529204719_create_action_step_resources.rb: -------------------------------------------------------------------------------- 1 | class CreateActionStepResources < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :action_step_resources do |t| 4 | t.references :action_step, null: false, foreign_key: true 5 | t.references :resource_item, null: false, foreign_key: true 6 | 7 | t.timestamps 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20240903102222_create_ltc_facilities.rb: -------------------------------------------------------------------------------- 1 | class CreateLtcFacilities < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :ltc_facilities do |t| 4 | t.string :name 5 | t.string :address_1 6 | t.string :address_2 7 | t.string :city 8 | t.string :state 9 | t.string :zip 10 | t.string :phone_number 11 | end 12 | end 13 | end -------------------------------------------------------------------------------- /app/assets/images/category_icons/droplet.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /db/migrate/20220127190728_create_customers.rb: -------------------------------------------------------------------------------- 1 | class CreateCustomers < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :customers do |t| 4 | t.timestamps 5 | t.string :name 6 | t.string :address 7 | t.string :city 8 | t.string :state 9 | t.string :zip 10 | t.string :notes 11 | t.string :status 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20240305195141_create_questionnaire_resources.rb: -------------------------------------------------------------------------------- 1 | class CreateQuestionnaireResources < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :questionnaire_resources do |t| 4 | t.references :questionnaire, null: false, foreign_key: true 5 | t.references :resource_item, null: false, foreign_key: true 6 | 7 | t.timestamps 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20240508215047_create_provider_action_resources.rb: -------------------------------------------------------------------------------- 1 | class CreateProviderActionResources < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :provider_action_resources do |t| 4 | t.references :action, null: false, foreign_key: true 5 | t.references :resource_item, null: false, foreign_key: true 6 | 7 | t.timestamps 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /app/models/result.rb: -------------------------------------------------------------------------------- 1 | class Result 2 | attr_reader :resource, :message, :success 3 | def initialize(resource, message, success) 4 | @resource = resource 5 | @message = message 6 | @error = message 7 | @success = success 8 | end 9 | 10 | def success? 11 | @success 12 | end 13 | 14 | def error 15 | @message 16 | end 17 | end -------------------------------------------------------------------------------- /config/initializers/lograge.rb: -------------------------------------------------------------------------------- 1 | #config/initializers/lograge.rb 2 | Rails.application.configure do 3 | # Lograge config 4 | config.lograge.enabled = true 5 | config.lograge.formatter = Lograge::Formatters::Json.new 6 | config.lograge.keep_original_rails_log = true 7 | config.lograge.custom_options = lambda do |event| 8 | { :params => event.payload[:params] } 9 | end 10 | end -------------------------------------------------------------------------------- /db/migrate/20210406151921_create_patient_medications.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class CreatePatientMedications < ActiveRecord::Migration[6.0] 4 | def change 5 | create_table :patient_medications do |t| 6 | t.references :user, null: false, foreign_key: true 7 | t.string :name 8 | t.string :value 9 | 10 | t.timestamps 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/seeds/patient_medications.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | if PatientMedication.count.zero? 4 | User.where(role: 'patient').each do |user| 5 | user.patient_medications.create!(name: 'Glargine', value: '20 units bedtime') 6 | user.patient_medications.create!(name: 'Lisinopril', value: '40mg AM') 7 | user.patient_medications.create!(name: 'Test BG', value: '3x/day') 8 | end 9 | end -------------------------------------------------------------------------------- /app/assets/images/category_icons/schedule.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /config/webpack/environment.js: -------------------------------------------------------------------------------- 1 | const { environment } = require('@rails/webpacker') 2 | const typescript = require('./loaders/typescript') 3 | const modernizr_config = require('./modernizr_config') 4 | 5 | environment.config.merge(modernizr_config) 6 | environment.loaders.prepend('typescript', typescript) 7 | environment.config.merge({ 8 | stats: 'none', 9 | }); 10 | 11 | module.exports = environment; -------------------------------------------------------------------------------- /db/migrate/20210405133619_add_field_to_users.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class AddFieldToUsers < ActiveRecord::Migration[6.0] 4 | def change 5 | add_column :users, :address, :string 6 | add_column :users, :city, :string 7 | add_column :users, :state, :string 8 | add_column :users, :zip, :string 9 | add_column :users, :mobile_phone_number, :string 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20230127165516_create_assigned_action_resources.rb: -------------------------------------------------------------------------------- 1 | class CreateAssignedActionResources < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :assigned_action_resources do |t| 4 | t.references :assigned_action, null: false, foreign_key: true 5 | t.references :resource_item, null: false, foreign_key: true 6 | 7 | t.timestamps 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20230803213135_add_meta_data_to_action_pathway_week_action.rb: -------------------------------------------------------------------------------- 1 | class AddMetaDataToActionPathwayWeekAction < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :assigned_pathway_week_actions, :deferred_at, :datetime 4 | add_column :assigned_pathway_week_actions, :dismissed_at, :datetime 5 | add_column :assigned_pathway_week_actions, :deferred_until, :datetime 6 | end 7 | end 8 | -------------------------------------------------------------------------------- /app/views/pages/customer_consent_new.html.erb: -------------------------------------------------------------------------------- 1 | <%= react_component("pages/CustomerConsentNew", { 2 | csrfToken: form_authenticity_token, 3 | uuid: @user.uuid, 4 | logo_src: image_url('logo.png'), 5 | button_src: image_url('login_button.svg'), 6 | pending_customer_user: @pending_customer_user, 7 | invited_by_name: @user.invited_by&.name, 8 | customer: @pending_customer_user&.customer 9 | }) %> -------------------------------------------------------------------------------- /db/migrate/20220224225417_create_user_privileges.rb: -------------------------------------------------------------------------------- 1 | class CreateUserPrivileges < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :user_privileges do |t| 4 | t.references :user, null: false, foreign_key: true 5 | t.references :privilege, null: false, foreign_key: true 6 | t.boolean :privilege_state, default: false 7 | t.timestamps 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20220526213000_create_adt_outbound_logs.rb: -------------------------------------------------------------------------------- 1 | class CreateAdtOutboundLogs < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :adt_outbound_logs do |t| 4 | t.references :user, null: false, foreign_key: true 5 | t.datetime :message_date 6 | t.string :message_control_id 7 | t.string :request_payload 8 | 9 | t.timestamps 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20230417155254_create_ambulatory_weekly_results.rb: -------------------------------------------------------------------------------- 1 | class CreateAmbulatoryWeeklyResults < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :ambulatory_weekly_results do |t| 4 | t.json :results 5 | t.references :user, null: false, foreign_key: true 6 | t.date :end_date 7 | t.string :data_type 8 | 9 | t.timestamps 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /app/models/ltc_facility_assignment.rb: -------------------------------------------------------------------------------- 1 | class LtcFacilityAssignment < ApplicationRecord 2 | belongs_to :user 3 | belongs_to :actor, class_name: 'User', foreign_key: 'actor_id' 4 | belongs_to :ltc_facility 5 | 6 | def as_json(options = {}) 7 | super(options).merge({ 8 | 'actor' => "#{actor&.last_name}, #{actor&.first_name}", 9 | 'facility_name' => ltc_facility.name 10 | }) 11 | end 12 | end -------------------------------------------------------------------------------- /db/migrate/20210611204712_create_actions.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class CreateActions < ActiveRecord::Migration[6.0] 4 | def change 5 | create_table :patient_actions do |t| 6 | t.references :action_category, null: false, foreign_key: true 7 | t.text :text 8 | t.text :subtext 9 | t.boolean :recurring 10 | 11 | t.timestamps 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20210616135202_create_patient_action_groups.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class CreatePatientActionGroups < ActiveRecord::Migration[6.0] 4 | def change 5 | create_table :patient_action_groups do |t| 6 | t.string :name 7 | t.references :pharmacy_group, null: false, foreign_key: true 8 | t.string :icon 9 | 10 | t.timestamps 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20220128215144_create_customer_selections.rb: -------------------------------------------------------------------------------- 1 | class CreateCustomerSelections < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :customer_selections do |t| 4 | t.timestamps 5 | t.references :user, null: false, foreign_key: true 6 | t.references :customer, null: false, foreign_key: true 7 | t.boolean :do_not_ask, default: false 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20231010191214_create_questionnaire_submissions.rb: -------------------------------------------------------------------------------- 1 | class CreateQuestionnaireSubmissions < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :questionnaire_submissions do |t| 4 | t.references :questionnaire_assignment, null: false, foreign_key: true 5 | t.references :user, foreign_key: true 6 | t.jsonb :answers 7 | t.timestamps 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20240221161043_create_questionnaire_actions.rb: -------------------------------------------------------------------------------- 1 | class CreateQuestionnaireActions < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :questionnaire_actions do |t| 4 | t.references :assigned_pathway_week_action, null: false, foreign_key: true 5 | t.references :questionnaire_submission, null: false, foreign_key: true 6 | 7 | t.timestamps 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /app/assets/images/category_icons/city.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/models/diagnosis_assignment.rb: -------------------------------------------------------------------------------- 1 | class DiagnosisAssignment < ApplicationRecord 2 | belongs_to :actor, class_name: 'User', foreign_key: 'actor_id' 3 | belongs_to :user 4 | 5 | def as_json(options = {}) 6 | super(options).merge({ 7 | 'actor' => "#{actor&.last_name}, #{actor&.first_name}", 8 | 'diagnosis' => "#{diagnosis_code_value} - #{diagnosis_code_desc}" 9 | }) 10 | end 11 | end -------------------------------------------------------------------------------- /db/migrate/20210813133740_create_action_resources.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class CreateActionResources < ActiveRecord::Migration[6.0] 4 | def change 5 | create_table :action_resources do |t| 6 | t.references :patient_action, null: false, foreign_key: true 7 | t.references :resource_item, null: false, foreign_key: true 8 | 9 | t.timestamps 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20230728155213_create_patient_historical_immunizations.rb: -------------------------------------------------------------------------------- 1 | class CreatePatientHistoricalImmunizations < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :patient_historical_immunizations do |t| 4 | t.references :user, null: false, foreign_key: true 5 | t.string :vaccine_name 6 | t.datetime :immunization_date 7 | 8 | t.timestamps 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20230928181004_add_missing_fields.rb: -------------------------------------------------------------------------------- 1 | class AddMissingFields < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :customers, :county, :string 4 | add_column :users, :county, :string 5 | add_column :users, :race, :string 6 | add_column :users, :ethnicity, :string 7 | add_reference :patient_forecast_immunizations, :provider, foreign_key: {to_table: :users} 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /remove-pid.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | cwd=$(pwd) 3 | pid_file="${cwd}/tmp/pids/server.pid" 4 | cat "${pid_file}" 5 | 6 | if [ $? -eq 0 ]; then 7 | # Assuming the process ID is stored in the server.pid file 8 | pid=$(cat "${pid_file}") 9 | # Send the kill signal to the process 10 | kill -9 ${pid} 11 | echo "Process with PID ${pid} killed." 12 | else 13 | echo "Failed to read or find the PID file." 14 | fi -------------------------------------------------------------------------------- /app/assets/images/category_icons/phone_link.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/views/guided_questionnaires/select_questionnaires.html.erb: -------------------------------------------------------------------------------- 1 | <%= react_component("guided_questionnaires/SelectQuestionnaires", { 2 | qrId: params[:id], 3 | csrfToken: form_authenticity_token, 4 | categories: @selected_categories.as_json(methods: :displayable_questionnaires), 5 | logo_src: image_url('logo_starfield_health.svg'), 6 | button_src: image_url('login_button.svg'), 7 | token: params[:token] 8 | }) %> -------------------------------------------------------------------------------- /db/migrate/20220224225407_create_privileges.rb: -------------------------------------------------------------------------------- 1 | class CreatePrivileges < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :privileges do |t| 4 | t.string :name 5 | t.text :description 6 | t.boolean :default_pharmacist 7 | t.boolean :default_physician 8 | t.boolean :default_coach 9 | t.boolean :default_patient 10 | t.timestamps 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20240827075446_add_last_first_middle_name_to_patient_insurances.rb: -------------------------------------------------------------------------------- 1 | class AddLastFirstMiddleNameToPatientInsurances < ActiveRecord::Migration[6.0] 2 | def change 3 | add_column :patient_insurances, :last_name, :string 4 | add_column :patient_insurances, :first_name, :string 5 | add_column :patient_insurances, :middle_name, :string 6 | add_column :patient_insurances, :country, :string 7 | end 8 | end 9 | -------------------------------------------------------------------------------- /db/migrate/20210707164152_create_weight_readings.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class CreateWeightReadings < ActiveRecord::Migration[6.0] 4 | def change 5 | create_table :weight_readings do |t| 6 | t.datetime :date_recorded 7 | t.string :reading_value 8 | t.text :notes 9 | t.references :user, null: false, foreign_key: true 10 | 11 | t.timestamps 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20241013205323_create_action_step_queues.rb: -------------------------------------------------------------------------------- 1 | class CreateActionStepQueues < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :action_step_queues do |t| 4 | t.references :action_queue, null: false, foreign_key: true 5 | t.references :action_step, null: false, foreign_key: true 6 | t.string :status, default: "incomplete" 7 | 8 | t.timestamps 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/seeds/weight_readings.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | if WeightReading.count.zero? 4 | User.where(role: 'patient').each do |user| 5 | user.weight_readings.create!(reading_value: '250', date_recorded: DateTime.now) 6 | user.weight_readings.create!(reading_value: '150', date_recorded: DateTime.now) 7 | user.weight_readings.create!(reading_value: '350', date_recorded: DateTime.now) 8 | end 9 | end 10 | -------------------------------------------------------------------------------- /app/javascript/images/check.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /db/migrate/20240227205619_create_questionnaire_categories.rb: -------------------------------------------------------------------------------- 1 | class CreateQuestionnaireCategories < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :questionnaire_categories do |t| 4 | t.references :customer, foreign_key: true 5 | t.string :display_name 6 | t.string :db_name 7 | t.boolean :is_default 8 | t.string :icon 9 | 10 | t.timestamps 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20240530174725_create_action_step_quick_launches.rb: -------------------------------------------------------------------------------- 1 | class CreateActionStepQuickLaunches < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :action_step_quick_launches do |t| 4 | t.string :launch_type 5 | t.references :action_step, null: true, foreign_key: true 6 | t.references :questionnaire, null: true, foreign_key: true 7 | 8 | t.timestamps 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /app/assets/images/category_icons/fitness.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/services/jwt_service.rb: -------------------------------------------------------------------------------- 1 | class JwtService 2 | attr_accessor :payload, :secret_key, :jwt_token 3 | 4 | def initialize(payload: {}, jwt_token: nil) 5 | @payload = payload 6 | @secret_key = ENV["NDM_API_SECRET"] 7 | @jwt_token = jwt_token 8 | end 9 | 10 | def encode 11 | JWT.encode(payload, secret_key, 'HS256') 12 | end 13 | 14 | def decode 15 | JWT.decode(jwt_token, secret_key, false) 16 | end 17 | end -------------------------------------------------------------------------------- /db/migrate/20210723154558_create_assigned_pathways.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class CreateAssignedPathways < ActiveRecord::Migration[6.0] 4 | def change 5 | create_table :assigned_pathways do |t| 6 | t.references :action_pathway, null: false, foreign_key: true 7 | t.references :user, null: false, foreign_key: true 8 | t.string :name 9 | 10 | t.timestamps 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20221213173803_create_provider_action_adt_notifications.rb: -------------------------------------------------------------------------------- 1 | class CreateProviderActionAdtNotifications < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :adt_provider_actions do |t| 4 | t.references :assigned_pathway_week_action, null: false, foreign_key: true 5 | t.references :adt_patient_notification, null: false, foreign_key: true 6 | 7 | t.timestamps 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /lib/tasks/custom_seed.rake: -------------------------------------------------------------------------------- 1 | namespace :db do 2 | namespace :seed do 3 | Dir[Rails.root.join('db', 'seeds', '*.rb')].each do |filename| 4 | task_name = File.basename(filename, '.rb') 5 | desc "Seed " + task_name + ", based on the file with the same name in `db/seeds/*.rb`" 6 | task task_name.to_sym => :environment do 7 | load(filename) if File.exist?(filename) 8 | end 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /app.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Starfield", 3 | "scripts": { 4 | "postdeploy": "rails db:migrate" 5 | }, 6 | "environments": { 7 | "review": { 8 | "addons": [ 9 | "heroku-postgresql:hobby-dev", 10 | "rollbar:free" 11 | ], 12 | "scripts": { 13 | "postdeploy": "bundle exec rails db:seed" 14 | } 15 | } 16 | } 17 | } -------------------------------------------------------------------------------- /app/javascript/components/utils/HeaderHelper.tsx: -------------------------------------------------------------------------------- 1 | export function getHeaders(csrfToken) { 2 | return { 3 | "content-type": "application/json", 4 | accept: "application/json", 5 | "X-CSRF-Token": csrfToken, 6 | "X-Frame-Options": "sameorigin", 7 | "X-XSS-Protection": "1; mode=block", 8 | "Referrer-Policy": "strict-origin-when-cross-origin", 9 | "Content-Security-Policy": "default-src 'self'", 10 | }; 11 | } 12 | -------------------------------------------------------------------------------- /app/models/action_pathway.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class ActionPathway < ApplicationRecord 4 | belongs_to :customer 5 | default_scope { includes(:action_pathway_weeks).order('created_at DESC') } 6 | 7 | has_many :action_pathway_weeks, dependent: :destroy 8 | has_many :assigned_pathways 9 | 10 | def as_json(options = {}) 11 | options[:include] = %i[action_pathway_weeks] 12 | super 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20220225171425_create_customer_user_privileges.rb: -------------------------------------------------------------------------------- 1 | class CreateCustomerUserPrivileges < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :customer_user_privileges do |t| 4 | t.references :customer_user, null: false, foreign_key: true 5 | t.references :privilege, null: false, foreign_key: true 6 | t.boolean :privilege_state, default: false 7 | t.timestamps 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20220713044705_create_encounter_billing_loggers.rb: -------------------------------------------------------------------------------- 1 | class CreateEncounterBillingLoggers < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :encounter_billing_loggers do |t| 4 | t.timestamps 5 | t.references :encounter_billings, null: false, foreign_key: true 6 | t.references :user, null: false, foreign_key: true 7 | t.string :name 8 | t.string :action 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /db/migrate/20220907013732_create_encounter_billing_send_charges_logs.rb: -------------------------------------------------------------------------------- 1 | class CreateEncounterBillingSendChargesLogs < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :eb_send_charges_logs do |t| 4 | t.timestamps 5 | t.references :encounter_billing, null: false, foreign_key: true 6 | t.references :user, null: false, foreign_key: true 7 | t.string :x12_data 8 | 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /app/models/action_step_quick_launch.rb: -------------------------------------------------------------------------------- 1 | class ActionStepQuickLaunch < ApplicationRecord 2 | belongs_to :questionnaire, optional: true 3 | belongs_to :action_step, optional: true 4 | 5 | enum launch_type: { 6 | questionnaire: "questionnaire", 7 | encounter: "encounter", 8 | } 9 | 10 | def serializable_hash(options = nil) 11 | super(options).merge( 12 | questionnaire: self.questionnaire, 13 | ) 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /app/views/layouts/_need_help.html.erb: -------------------------------------------------------------------------------- 1 |

Need help or have questions?
2 | Send a message to info@starfield.health

3 | 4 |

Starfield Health, all rights reserved.
5 | 1641 Capitol Way, Bismarck, ND 58501

-------------------------------------------------------------------------------- /db/migrate/20210719140011_create_action_pathway_week_actions.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class CreateActionPathwayWeekActions < ActiveRecord::Migration[6.0] 4 | def change 5 | create_table :action_pathway_week_actions do |t| 6 | t.references :patient_action, null: false, foreign_key: true 7 | t.references :action_pathway_week, null: false, foreign_key: true 8 | 9 | t.timestamps 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20240923213357_create_action_queue_histories.rb: -------------------------------------------------------------------------------- 1 | class CreateActionQueueHistories < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :action_queue_histories do |t| 4 | t.references :action_queue, null: false 5 | t.references :user, foreign_key: { to_table: :users }, index: true, null: true 6 | t.string :history_type 7 | t.text :description 8 | 9 | t.timestamps 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /app/assets/images/category_icons/chat_bubble.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /config/environment.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # Load the Rails application. 4 | require_relative 'application' 5 | 6 | # Initialize the Rails application. 7 | Rails.application.initialize! 8 | 9 | ActionMailer::Base.smtp_settings = { 10 | address: ENV['SMTP_ADDRESS'], 11 | port: 587, 12 | user_name: ENV['SMTP_USERNAME'], 13 | password: ENV['SMTP_PASSWORD'], 14 | authentication: 'login', 15 | enable_starttls_auto: true 16 | } 17 | -------------------------------------------------------------------------------- /db/migrate/20210616135238_create_patient_action_group_actions.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class CreatePatientActionGroupActions < ActiveRecord::Migration[6.0] 4 | def change 5 | create_table :patient_action_group_actions do |t| 6 | t.references :patient_action_group, null: false, foreign_key: true 7 | t.references :patient_action, null: false, foreign_key: true 8 | 9 | t.timestamps 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /db/migrate/20240213203556_create_customer_permission_controls.rb: -------------------------------------------------------------------------------- 1 | class CreateCustomerPermissionControls < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :customer_permission_controls do |t| 4 | t.references :customer, null: false, foreign_key: true 5 | t.references :customer_permission, null: false, foreign_key: true 6 | t.boolean :permitted, default: false 7 | 8 | t.timestamps 9 | end 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /app/controllers/users/sessions_controller.rb: -------------------------------------------------------------------------------- 1 | class Users::SessionsController < Devise::SessionsController 2 | skip_before_action :authenticate_user! #TODO should this be authenticated? 3 | before_action :remove_customer_selection, only: :destroy 4 | 5 | def remove_customer_selection 6 | customer_selection = current_user.customer_selection 7 | unless customer_selection.do_not_ask 8 | customer_selection.destroy 9 | end 10 | end 11 | end -------------------------------------------------------------------------------- /app/helpers/date_helper.rb: -------------------------------------------------------------------------------- 1 | module DateHelper 2 | def last_day_of_week(date) 3 | # Convert the date to a DateTime object if it's a string 4 | date = Date.parse(date) if date.is_a? String 5 | 6 | # Subtract the day of the week from 6 (Saturday) to get the number of days 7 | # to add to reach Saturday. Then add that number of days to the given date. 8 | saturday = date + (6 - date.wday).days 9 | 10 | saturday 11 | end 12 | end -------------------------------------------------------------------------------- /app/models/ltc_facility.rb: -------------------------------------------------------------------------------- 1 | class LtcFacility < ApplicationRecord 2 | has_many :ltc_facility_assignments 3 | has_many :users, through: :ltc_facility_assignments, dependent: :destroy 4 | has_many :patients, class_name: 'User', foreign_key: 'facility_id' 5 | belongs_to :customer 6 | 7 | def as_json(options = {}) 8 | super(options).merge({ 9 | 'patient_count' => ltc_facility_assignments.where(active: true).count 10 | }) 11 | end 12 | end -------------------------------------------------------------------------------- /db/migrate/20230411170120_create_patient_instructions.rb: -------------------------------------------------------------------------------- 1 | class CreatePatientInstructions < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :patient_instructions do |t| 4 | t.timestamps 5 | t.string :notes, default: "" 6 | t.references :creator, null: false, foreign_key: {to_table: 'users'} 7 | t.references :encounter_billing, null: false, foreign_key: {to_table: 'encounter_billings'} 8 | end 9 | end 10 | end 11 | -------------------------------------------------------------------------------- /app/assets/images/category_icons/golf.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/assets/images/md-close.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /db/migrate/20240628182048_rename_columns_to_questionnaire.rb: -------------------------------------------------------------------------------- 1 | class RenameColumnsToQuestionnaire < ActiveRecord::Migration[6.0] 2 | def up 3 | rename_column :questionnaires, :questions, :old_questions 4 | rename_column :questionnaire_submissions, :answers, :old_answers 5 | end 6 | 7 | def down 8 | rename_column :questionnaires, :old_questions, :questions 9 | rename_column :questionnaire_submissions, :old_answers, :answers 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /app/views/devise/mailer/reset_password_instructions.html.erb: -------------------------------------------------------------------------------- 1 |

Hello <%= @resource.email %>!

2 | 3 |

Someone has requested a link to change your password. You can do this through the link below.

4 | 5 |

<%= link_to 'Change my password', edit_password_url(@resource, reset_password_token: @token) %>

6 | 7 |

If you didn't request this, please ignore this email.

8 |

Your password won't change until you access the link above and create a new one.

9 | -------------------------------------------------------------------------------- /db/migrate/20210329185520_create_chat_channel_users.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class CreateChatChannelUsers < ActiveRecord::Migration[6.0] 4 | def change 5 | create_table :chat_channel_users do |t| 6 | t.references :user, null: false, foreign_key: true 7 | t.references :chat_channel, null: false, foreign_key: true 8 | t.string :chat_user 9 | t.string :user_type 10 | 11 | t.timestamps 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20240620154102_create_programs.rb: -------------------------------------------------------------------------------- 1 | class CreatePrograms < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :programs do |t| 4 | t.string :title, null: false 5 | 6 | t.datetime "published_at" 7 | t.string "subtext" 8 | t.string "status", default: "draft" 9 | t.boolean "is_archived", default: false 10 | t.references :customer, foreign_key: true 11 | 12 | t.timestamps 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /spec/models/action_category_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'rails_helper' 4 | 5 | RSpec.describe ActionCategory, type: :model do 6 | describe 'with data' do 7 | it 'should create a record' do 8 | user = User.create(email: 'dev@codelation.com', password: 'CL_key123', first_name: 'Dev', last_name: "User") 9 | record = ActionCategory.create(name: 'Test') 10 | expect(record.save).to be true 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /spec/models/chat_channel_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'rails_helper' 4 | 5 | RSpec.describe ChatChannel, type: :model do 6 | describe 'with data' do 7 | it 'should create a record' do 8 | user = User.create(email: 'dev@codelation.com', password: 'CL_key123', first_name: 'Dev', last_name: "User") 9 | record = user.chat_channels.create(name: 'Test Data') 10 | expect(record.save).to be true 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /config/webpack/development.js: -------------------------------------------------------------------------------- 1 | process.env.NODE_ENV = process.env.NODE_ENV || 'development' 2 | 3 | const environment = require('./environment') 4 | 5 | environment.config.merge({ 6 | watchOptions: { 7 | ignored: /node_modules/, 8 | aggregateTimeout: 300, // Delay the rebuild after the first change 9 | poll: 1000 // Check for changes every second 10 | }, 11 | stats: 'none' 12 | }); 13 | 14 | module.exports = environment.toWebpackConfig() 15 | -------------------------------------------------------------------------------- /db/migrate/20210713125851_create_resource_items.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class CreateResourceItems < ActiveRecord::Migration[6.0] 4 | def change 5 | create_table :resource_items do |t| 6 | t.string :name 7 | t.string :link_url 8 | t.string :resource_type 9 | t.boolean :is_deleted, default: false 10 | t.references :pharmacy_group, null: false, foreign_key: true 11 | 12 | t.timestamps 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /db/migrate/20230726190032_create_patient_forecast_immunizations.rb: -------------------------------------------------------------------------------- 1 | class CreatePatientForecastImmunizations < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :patient_forecast_immunizations do |t| 4 | t.references :user, null: false, foreign_key: true 5 | t.string :vaccine_type 6 | t.integer :dose_number 7 | t.datetime :recommended_date 8 | t.datetime :minimum_valid_date 9 | t.timestamps 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /app/models/dummy_email.rb: -------------------------------------------------------------------------------- 1 | class DummyEmail 2 | # this email is use when a user does not have email we use this template 3 | # called on bulk patient upload and manual patient creation 4 | def initialize 5 | end 6 | 7 | def get_email 8 | random_letter = ('a'..'z').to_a.sample 9 | uniq_time = Time.now.to_i 10 | dummy_email = "#{uniq_time}#{random_letter}@no-email-user.com" 11 | return dummy_email 12 | end 13 | end 14 | 15 | -------------------------------------------------------------------------------- /app/models/patient_medication.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class PatientMedication < ApplicationRecord 4 | belongs_to :user 5 | default_scope { order('created_at DESC') } 6 | 7 | def serializable_hash(options = nil) 8 | super(options).merge( 9 | formatted_created_at: formatted_created_at, 10 | ) 11 | end 12 | 13 | private 14 | 15 | 16 | def formatted_created_at 17 | self.created_at&.strftime("%m/%d/%Y") 18 | end 19 | 20 | end 21 | -------------------------------------------------------------------------------- /app/models/weight_reading.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class WeightReading < ApplicationRecord 4 | belongs_to :user 5 | belongs_to :creator, class_name: "User", foreign_key: "created_by_id", optional: true 6 | default_scope { where('date_recorded > ?', 4.weeks.ago).order('date_recorded DESC').limit(50) } 7 | 8 | def serializable_hash(options = nil) 9 | super(options).merge( 10 | user: user, 11 | creator: creator 12 | ) 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /db/migrate/20240606163838_create_action_step_automations.rb: -------------------------------------------------------------------------------- 1 | class CreateActionStepAutomations < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :action_step_automations do |t| 4 | t.string :automation_type 5 | t.string :activity_type, default: 'sending' 6 | t.references :action_step, null: true, foreign_key: true 7 | t.references :questionnaire, null: true, foreign_key: true 8 | 9 | t.timestamps 10 | end 11 | end 12 | end 13 | -------------------------------------------------------------------------------- /app/assets/stylesheets/application/adt_notifications.scss: -------------------------------------------------------------------------------- 1 | .notification-container { 2 | .notif-table { 3 | border-collapse: collapse; 4 | width: 100%; 5 | background-color: white; 6 | .notif-header { 7 | text-align: left; 8 | padding: 15px; 9 | } 10 | 11 | .notif-data-row { 12 | border-bottom: 1px solid black; 13 | 14 | .notif-data { 15 | font-size: 14px; 16 | padding: 10px; 17 | } 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /app/models/action_step_automation.rb: -------------------------------------------------------------------------------- 1 | class ActionStepAutomation < ApplicationRecord 2 | belongs_to :questionnaire, optional: true 3 | belongs_to :action_step, optional: true 4 | 5 | enum activity_type: { 6 | sending: "sending", 7 | } 8 | 9 | enum automation_type: { 10 | questionnaire: "questionnaire", 11 | } 12 | 13 | def serializable_hash(options = nil) 14 | super(options).merge( 15 | questionnaire: self.questionnaire, 16 | ) 17 | end 18 | end 19 | -------------------------------------------------------------------------------- /app/models/patient_instruction.rb: -------------------------------------------------------------------------------- 1 | class PatientInstruction < ApplicationRecord 2 | belongs_to :encounter_billing 3 | has_many :instruction_blocks, dependent: :destroy 4 | 5 | def full_json 6 | self.attributes.merge({"blocks" => self.blocks}) 7 | end 8 | 9 | def to_text 10 | self.blocks.present? ? self.blocks.map{|b| b.note}.join("
") : "" 11 | end 12 | 13 | def blocks 14 | self.instruction_blocks 15 | end 16 | end 17 | -------------------------------------------------------------------------------- /config/initializers/stream.rb: -------------------------------------------------------------------------------- 1 | require 'stream-chat' 2 | require 'stream-chat/version' 3 | client = StreamChat::Client.new(api_key = ENV['GETSTREAM_API_KEY'], api_secret = ENV['GETSTREAM_API_SECRET']) 4 | # enable reminders for the channel type `messaging` 5 | # client.update_channel_type("messaging", reminders: true) 6 | # client.update_channel_type("team", reminders: true) 7 | # # change reminders interval to 1 hour (interval in seconds) 8 | # client.update_app_settings(reminders_interval: 43200); -------------------------------------------------------------------------------- /db/migrate/20210707164214_create_blood_pressure_readings.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class CreateBloodPressureReadings < ActiveRecord::Migration[6.0] 4 | def change 5 | create_table :blood_pressure_readings do |t| 6 | t.datetime :date_recorded 7 | t.string :systolic_value 8 | t.string :diastolic_value 9 | t.text :notes 10 | t.references :user, null: false, foreign_key: true 11 | 12 | t.timestamps 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /db/migrate/20210723154419_create_assigned_actions.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class CreateAssignedActions < ActiveRecord::Migration[6.0] 4 | def change 5 | create_table :assigned_actions do |t| 6 | t.references :patient_action, null: false, foreign_key: true 7 | t.text :text 8 | t.text :subtext 9 | t.boolean :recurring 10 | t.references :user, null: false, foreign_key: true 11 | 12 | t.timestamps 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /db/migrate/20220713043822_create_encounter_billings.rb: -------------------------------------------------------------------------------- 1 | class CreateEncounterBillings < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :encounter_billings do |t| 4 | t.timestamps 5 | t.references :patient, null: false, foreign_key: {to_table: 'users'} 6 | t.string :encounter_type 7 | t.date :day_of_encounter 8 | t.string :place_of_service 9 | t.string :status 10 | t.boolean :generate_claim 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /db/migrate/20231103185425_create_lab_readings.rb: -------------------------------------------------------------------------------- 1 | class CreateLabReadings < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :lab_readings do |t| 4 | t.string :reading_type, null: false 5 | t.string :reading_value, null: false 6 | t.datetime :date_recorded, null: false 7 | t.references :user, :created_by, foreign_key: { to_table: :users}, null: false 8 | t.text :notes 9 | 10 | t.timestamps 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/assets/images/category_icons/events.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /app/assets/images/history_icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /app/models/action_pathway_week.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class ActionPathwayWeek < ApplicationRecord 4 | belongs_to :action_pathway 5 | has_many :action_pathway_week_actions, dependent: :destroy 6 | 7 | def as_json(options = {}) 8 | options[:include] = %i[action_pathway_week_actions] 9 | super 10 | end 11 | 12 | def serializable_hash(options = nil) 13 | super(options).merge(action_pathway_week_actions: action_pathway_week_actions) 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /app/models/assigned_pathway_week.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class AssignedPathwayWeek < ApplicationRecord 4 | belongs_to :assigned_pathway 5 | has_many :assigned_pathway_week_actions, dependent: :destroy 6 | default_scope { includes(:assigned_pathway_week_actions).order('assigned_pathway_weeks.start_date ASC') } 7 | 8 | def serializable_hash(options = nil) 9 | super(options).merge(assigned_pathway_week_actions: assigned_pathway_week_actions) 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /app/sms_templates/unread_message_sms.rb: -------------------------------------------------------------------------------- 1 | class UnreadMessageSms 2 | def self.text(user) 3 | url_helper = Rails.application.routes.url_helpers 4 | "You have new messages from your provider at #{APP_NAME}. Login at the link provided. 5 | #{url_helper.new_user_session_url} 6 | 7 | If you would no longer like to receive these messages, please click the second provided link below. 8 | #{url_helper.edit_chat_notification_url(id: user.id, opt_out_key: user.opt_out_key)}" 9 | end 10 | end -------------------------------------------------------------------------------- /config/initializers/backtrace_silencers.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | # Be sure to restart your server when you modify this file. 3 | 4 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. 5 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } 6 | 7 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. 8 | # Rails.backtrace_cleaner.remove_silencers! 9 | -------------------------------------------------------------------------------- /db/migrate/20240308222229_create_questionnaire_qrs.rb: -------------------------------------------------------------------------------- 1 | class CreateQuestionnaireQrs < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :questionnaire_qrs do |t| 4 | t.uuid :uuid, default: -> { "gen_random_uuid()" }, null: false 5 | t.references :customer, null: false, foreign_key: true 6 | t.integer :patient_id 7 | t.integer :assigned_by_id 8 | t.boolean :is_valid, default: true 9 | 10 | t.timestamps 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /spec/models/patient_device_spec.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | require 'rails_helper' 4 | 5 | RSpec.describe PatientDevice, type: :model do 6 | describe 'with data' do 7 | it 'should create a record' do 8 | user = User.create(email: 'dev@codelation.com', password: 'CL_key123', first_name: 'Dev', last_name: "User") 9 | record = PatientDevice.create(user_id: user.id, identifier: '99999') 10 | expect(record.save).to be true 11 | end 12 | end 13 | end 14 | -------------------------------------------------------------------------------- /app/assets/images/category_icons/walk.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /config/webpack/modernizr_config.js: -------------------------------------------------------------------------------- 1 | const path = require('path') 2 | module.exports = { 3 | module: { 4 | rules: [ 5 | { 6 | loader: "webpack-modernizr-loader", 7 | test: /\.modernizrrc\.js$/ 8 | // Uncomment this when you use `JSON` format for configuration 9 | // type: 'javascript/auto' 10 | } 11 | ] 12 | }, 13 | resolve: { 14 | alias: { 15 | modernizr$: path.resolve(__dirname, "./.modernizrrc.js") 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /app/assets/stylesheets/application/pagination.scss: -------------------------------------------------------------------------------- 1 | .pagerLinks { 2 | text-align: center; 3 | a { 4 | cursor: pointer; 5 | text-align: center; 6 | padding: 5px; 7 | font-size: 18px; 8 | font-family: $font-qs-medium; 9 | &:hover { 10 | text-decoration: none; 11 | } 12 | } 13 | 14 | svg { 15 | vertical-align: bottom; 16 | } 17 | } 18 | .linkDark { 19 | color: $color-dark-grey-text !important; 20 | } 21 | .linkLight { 22 | color: #c1b7b3 !important; 23 | } -------------------------------------------------------------------------------- /db/migrate/20210421172233_create_patient_device_readings.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class CreatePatientDeviceReadings < ActiveRecord::Migration[6.0] 4 | def change 5 | create_table :patient_device_readings do |t| 6 | t.references :patient_device, null: false, foreign_key: true 7 | t.string :reading_type 8 | t.string :reading_value 9 | t.string :reading_id 10 | t.datetime :date_recorded 11 | 12 | t.timestamps 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /db/migrate/20230906143257_create_questionnaires.rb: -------------------------------------------------------------------------------- 1 | class CreateQuestionnaires < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :questionnaires do |t| 4 | t.references :user, null: false, foreign_key: true 5 | t.references :customer, null: false, foreign_key: true 6 | t.string :name 7 | t.string :description 8 | t.string :category 9 | t.string :status 10 | t.jsonb :questions 11 | 12 | t.timestamps 13 | end 14 | end 15 | end 16 | -------------------------------------------------------------------------------- /db/migrate/20240907090004_create_diagnosis_assignment.rb: -------------------------------------------------------------------------------- 1 | class CreateDiagnosisAssignment < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :diagnosis_assignments do |t| 4 | t.references :user, null: false, foreign_key: true, index: true 5 | t.string :diagnosis_code_value 6 | t.string :diagnosis_code_desc 7 | t.string :action_type 8 | t.integer :actor_id 9 | t.boolean :active, null: false 10 | 11 | t.timestamps 12 | end 13 | end 14 | end -------------------------------------------------------------------------------- /.eslintrc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | parser: "babel-eslint", 3 | parserOptions: { 4 | ecmaVersion: 2020, 5 | sourceType: "module", 6 | ecmaFeatures: { 7 | jsx: true, 8 | }, 9 | }, 10 | settings: { 11 | react: { 12 | version: "detect", 13 | }, 14 | }, 15 | extends: [ 16 | "plugin:react/recommended", 17 | "plugin:prettier/recommended", 18 | "plugin:react-hooks/recommended", 19 | ], 20 | rules: { 21 | "react/prop-types": 0, 22 | }, 23 | }; 24 | -------------------------------------------------------------------------------- /app/models/patient_historical_immunization.rb: -------------------------------------------------------------------------------- 1 | class PatientHistoricalImmunization < ApplicationRecord 2 | belongs_to :user 3 | # callbacks 4 | before_create :validate_uniq_historic 5 | 6 | private 7 | 8 | def validate_uniq_historic 9 | if PatientHistoricalImmunization.exists?(user_id: self.user_id, vaccine_name: self.vaccine_name, immunization_date: self.immunization_date) 10 | errors.add(:base, 'Forecast already exists.') 11 | throw :abort 12 | end 13 | end 14 | end 15 | -------------------------------------------------------------------------------- /app/views/devise/shared/_error_messages.html.erb: -------------------------------------------------------------------------------- 1 | <% if resource.errors.any? %> 2 |
3 |

4 | <%= I18n.t("errors.messages.not_saved", 5 | count: resource.errors.count, 6 | resource: resource.class.model_name.human.downcase) 7 | %> 8 |

9 | 14 |
15 | <% end %> 16 | -------------------------------------------------------------------------------- /app/models/encounter_billing_logger.rb: -------------------------------------------------------------------------------- 1 | class EncounterBillingLogger < ApplicationRecord 2 | belongs_to :encounter_billing 3 | belongs_to :user 4 | 5 | enum action: { 6 | "created": "created", 7 | "updated": "updated", 8 | "added_addendum": "added_addendum", 9 | "sent_charges": "sent_charges", 10 | "pended": "pended", 11 | "signed": "signed", 12 | "code_added": "code_added", 13 | "code_removed": "code_removed", 14 | } 15 | 16 | end -------------------------------------------------------------------------------- /create-ebs-deploy-mac.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # If you are getting the nokogiri not found error on EBS, uncomment the following 3 lines and run again - GL 3 | rm -rf vendor/cache 4 | bundle config set force_ruby_platform true 5 | # bundle install 6 | bundle package --all 7 | mv ../rails-default* ../pharm-deploy-backups 8 | current_time=$(date "+%Y.%m.%d-%H.%M.%S") 9 | file_name="rails-default-sf"."$current_time"."zip" 10 | zip ../$file_name -r * .[^.]* -x "./node_modules/*" "./.git/*" "./tmp/*" "./log/*" "./storage/*" -------------------------------------------------------------------------------- /db/migrate/20210518145124_add_devise_trackable_columns_to_users.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | class AddDeviseTrackableColumnsToUsers < ActiveRecord::Migration[6.0] 4 | def change 5 | add_column :users, :sign_in_count, :integer, default: 0, null: false 6 | add_column :users, :current_sign_in_at, :datetime 7 | add_column :users, :last_sign_in_at, :datetime 8 | add_column :users, :current_sign_in_ip, :string 9 | add_column :users, :last_sign_in_ip, :string 10 | end 11 | end 12 | -------------------------------------------------------------------------------- /app/models/customer_permission.rb: -------------------------------------------------------------------------------- 1 | class CustomerPermission < ApplicationRecord 2 | has_many :customer_permission_controls 3 | 4 | # default privilege can be added and update via populate_default_customer_privilege.rake 5 | # after adding new privilege, run 2 taks from that rake file 6 | # existing default_permissions = [ 7 | # "Allow questionnaires to display on local device", 8 | # "Allow questionnaires to be assigned to patients by SMS text", 9 | # ] 10 | end 11 | -------------------------------------------------------------------------------- /db/migrate/20240815203744_create_assignment_histories.rb: -------------------------------------------------------------------------------- 1 | class CreateAssignmentHistories < ActiveRecord::Migration[6.0] 2 | def change 3 | create_table :assignment_histories do |t| 4 | t.references :loggable, polymorphic: true, null: false 5 | t.references :patient, foreign_key: { to_table: :users }, index: true, null: false 6 | t.references :user, foreign_key: { to_table: :users }, index: true, null: true 7 | t.text :description 8 | 9 | t.timestamps 10 | end 11 | end 12 | end 13 | --------------------------------------------------------------------------------