Skip to content

Instantly share code, notes, and snippets.

@itsaliu90
Last active August 22, 2018 20:51
Show Gist options
  • Select an option

  • Save itsaliu90/770799264120d733f736438961a34d83 to your computer and use it in GitHub Desktop.

Select an option

Save itsaliu90/770799264120d733f736438961a34d83 to your computer and use it in GitHub Desktop.
def sanity_check(cp_id)
patient_count = Patient.where(care_provider_ids: cp_id).count
encounter_count = Encounter.where(care_provider_id: cp_id).count
patient_interaction_count = PatientInteraction.where(care_provider_id: cp_id).count
patient_issue_count = PatientIssue.where(care_provider_id: cp_id).count
archived_call_attempt_count = ArchivedCallAttempt.where(care_provider_id: cp_id).count
puts "#{patient_count}\t#{encounter_count}\t#{patient_interaction_count}\t#{patient_issue_count}\t#{archived_call_attempt_count}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment