mooreniemi / Transbucket_Rails

:hospital: → :camera: → :thumbsup:
http://www.transbucket.com
10 stars 4 forks source link

surface complications stats #102

Open mooreniemi opened 3 years ago

mooreniemi commented 3 years ago

Complications are stored as tags. They're pretty messy. It was not an ideal design. It'd be good to surface some of the information in them to users. Both at procedure and surgeon level.

Some queries:

ActsAsTaggableOn::Tagging.includes(:tag).where(context: 'complications').pluck(:taggable_id, :name).group_by {|id, name| id }