Skip to content

Commit

Permalink
3/28 started patient history databasing
Browse files Browse the repository at this point in the history
  • Loading branch information
HashSolo committed Mar 29, 2012
1 parent 197d4ca commit 5269355
Show file tree
Hide file tree
Showing 5 changed files with 132 additions and 16 deletions.
1 change: 0 additions & 1 deletion Gemfile
Expand Up @@ -42,7 +42,6 @@ group :test do
gem 'sqlite3'
end


# Use unicorn as the web server
# gem 'unicorn'

Expand Down
11 changes: 1 addition & 10 deletions app/assets/stylesheets/pages.css.erb
Expand Up @@ -98,7 +98,6 @@ ul.patient_index li a {text-decoration:none;}
ul.patient_index li span{display:inline-block;vertical-align:top;}
ul.patient_index li span.left{width:20%;border:2px solid #325d5d;}
ul.patient_index li span.left:hover {background:#325d5d;}
/*ul.patient_index li span.left span.text_label {font-size:12px;margin-left:30%;}*/
ul.patient_index li span.left h1 {font-size:10%;text-align:center}
ul.patient_index li span.left span.icon{margin-left:15%;font-size:90px;}
ul.patient_index li span.left span.female{color:pink;}
Expand All @@ -121,7 +120,7 @@ ul.case_index li span{display:inline-block;vertical-align:top;}
ul.case_index li span.left{width:20%;border:2px solid #325d5d;}
ul.case_index li span.left:hover {background:#325d5d;}
ul.case_index li span.left h1 {font-size:10%;text-align:center;color:#325d5d;}
ul.case_index li span.left span.icon{margin-left:15%;font-size:90px;color:#325d5d;}
ul.case_index li span.left span.icon{margin-left:22%;font-size:70px;color:#325d5d;}
ul.case_index li span.left:hover span.icon{color:#ffffff;}
ul.case_index li span.left:hover h1 {color:#ffffff;}
ul.case_index li span.middle {margin-left:8%;width:40%;}
Expand All @@ -134,14 +133,6 @@ ul.case_index li span.right h1 {font-size:20px;text-align:center;}
ul.case_index li span.right table {margin-left:auto;margin-right:auto;}
ul.case_index li span.right table tr td {font-size:15px;text-align:center;}

/*
ul.patient_index li span ul li{list-style-type:none;}

ul.patient_index li a span ul li span.text_label {font-size:10px;width:100%;display:inline-block;list-style-type:none;}
ul.patient_index li a span ul li span.icon{display:inline-block;width:100%;padding-top:15px;list-style-type:none;}
ul.patient_index li span table tr td
*/

/*Home Page*/
div.nav_bar {padding:0px;margin:auto;width:100%;height:50px;background:#7895a3;}
ul.nav_bar {list-style-type:none;margin:0;padding:0;}
Expand Down
9 changes: 5 additions & 4 deletions app/controllers/cases_controller.rb
Expand Up @@ -5,11 +5,12 @@ def index
end

def show
@case = Case.find_by_id(params[:id])
@case = Case.find(params[:id])
@title = "Case #{@case.id}"
@clinician = Clinician.find_by_id(@case.clinician_id)
@referrer = Referrer.find_by_id(@case.referrer_id)
@user = User.find_by_id(@case.user_id)
@clinician = Clinician.find(@case.clinician_id)
@referrer = Referrer.find(@case.referrer_id)
@user = User.find(@case.user_id)
@patients = @case.patients.all
end

def new
Expand Down
2 changes: 1 addition & 1 deletion app/views/cases/new.html.erb
Expand Up @@ -33,7 +33,7 @@
</table>
</div>
</div>
</div>
</div>


<div class="grid_9 alpha omega">
Expand Down
125 changes: 125 additions & 0 deletions db/migrate/20120328205632_add_fields_to_history_females.rb
@@ -0,0 +1,125 @@
class AddFieldsToHistoryFemales < ActiveRecord::Migration
def change

#basic
add_column :history_females, :name, :string
add_column :history_females, :occupation, :string
add_column :history_females, :height_ft, :integer
add_column :history_females, :height_in, :integer
add_column :history_females, :weight, :integer
add_column :history_females, :birth_date, :date
add_column :history_females, :race, :string
add_column :history_females, :pregnancies, :integer
add_column :history_females, :term_births, :integer
add_column :history_females, :age, :integer
add_column :history_females, :marriage_status, :string
add_column :history_females, :preterm_births, :integer
add_column :history_females, :miscarriages_or_abortions, :integer
add_column :history_females, :ectopic, :integer
add_column :history_females, :months_trying, :integer
add_column :history_females, :months_trying_with_partner, :integer

#pregnancies
#pregnancy table

#menstrual cycle
add_column :history_females, :age_when_periods_start, :integer
add_column :history_females, :last_menstrual_period, :date
add_column :history_females, :average_days_of_period, :integer
add_column :history_females, :average_days_between_periods, :integer
add_column :history_females, :are_periods_typical, :boolean
add_column :history_females, :always_irregular_periods, :boolean, :default => nil
add_column :history_females, :bleeding_between_periods, :boolean
add_column :history_females, :period_medication, :boolean
add_column :history_females, :premarin: :boolean
add_column :history_females, :estrace, :boolean
add_column :history_females, :birth_control, :boolean
add_column :history_females, :progesterone, :boolean
add_column :history_females, :provera, :boolean
add_column :history_females, :cycrin, :boolean
add_column :history_females, :aygestin, :boolean
add_column :history_females, :crinone, :boolean
add_column :history_females, :prometrium, :boolean
add_column :history_females, :other_period_medication_boolean, :boolean
add_column :history_females, :other_period_medication_string, :string
add_column :history_females, :pelvic_pain_with_periods, :boolean
add_column :history_females, :pelvic_pain_degree, :string, :default => nil
add_column :history_females, :pelvic_pain_between_periods, :boolean
add_column :history_females, :pelvic_pain_medication, :boolean
add_column :history_females, :pelvic_pain_medication_string, :string, :default => nil
add_column :history_females, :pelvic_pain_medication_works, :boolean, :default => nil
add_column :history_females, :ovulation_predictor_kit, :boolean
add_column :history_females, :positive_test, :boolean, :default => nil
add_column :history_females, :color_change, :boolean, :default => nil
add_column :history_females, :other_ovulation_evidence, :string, :default => nil
add_column :history_females, :positive_day_range, :string, :default => nil
add_column :history_females, :past_contraceptive_use, :boolean
add_column :history_females, :past_birth_control, :boolean, :default => nil
add_column :history_females, :past_injectable_hormones, :boolean, :default => nil
add_column :history_females, :past_hormone_patch, :boolean, :default => nil
add_column :history_females, :past_iud, :boolean, :default => nil
add_column :history_females, :past_tubal_ligation, :boolean, :default => nil
add_column :history_females, :past_other_contraceptive, :string, :default => nil
add_column :history_females, :current_contraceptive_user, :boolean
add_column :history_females, :current_birth_control, :boolean, :default => nil
add_column :history_females, :current_injectable_hormones, :boolean, :default => nil
add_column :history_females, :current_hormone_patch, :boolean, :default => nil
add_column :history_females, :current_iud, :boolean, :default => nil
add_column :history_females, :current_tubal_ligation, :boolean, :default => nil
add_column :history_females, :current_other_contraceptive, :string, :default => nil

#gynecologic
add_column :history_females, :pap_smear_current, :boolean
add_column :history_females, :last_pap_smear, :date, :default => nil
add_column :history_females, :pap_smear_abnormal, :boolean
add_column :history_females, :pap_smear_abnormality, :string, :default => nil
add_column :history_females, :mammogram_current, :boolean
add_column :history_females, :last_mammogram, :date, :default => nil
add_column :history_females, :breast_discharge, :boolean
add_column :history_females, :current_acne, :boolean
add_column :history_females, :unwanted_hair, :boolean
add_column :history_females, :sexual_orientation, :string
add_column :history_females, :sexual_partners, :integers
add_column :history_females, :sexual_abuse, :boolean
add_column :history_females, :abuse_counseling, :boolean, :default => nil
add_column :history_females, :abuse_counseling_referral, :default => nil
add_column :history_females, :intercourse_pain, :boolean
add_column :history_females, :weekly_intercourse_frequency, :integer
add_column :history_females, :colposcopy, :boolean
add_column :history_females, :colposcopy_date, :date, :default => nil
add_column :history_females, :colposcopy_findings, :string, :default => nil
add_column :history_females, :cone_biopsy, :boolean
add_column :history_females, :cone_biopsy_date, :date, :default => nil
add_column :history_females, :cone_biopsy_findings, :string, :default => nil
add_column :history_females, :leep, :boolean
add_column :history_females, :leep_date, :date, :default => nil
add_column :history_females, :leep_findings, :string, :default => nil
add_column :history_females, :cryosurgery, :boolean
add_column :history_females, :cryosurgery, :date, :default => nil
add_column :history_females, :laser_treatment, :boolean
add_column :history_females, :laser_treatment_date, :date, :default => nil
add_column :history_females, :std_or_infection, :boolean
add_column :history_females, :gonorrhea, :boolean, :default => nil
add_column :history_females, :chlamydia, :boolean, :default => nil
add_column :history_females, :herpes, :boolean, :default => nil
add_column :history_females, :syphillis, :boolean, :default => nil
add_column :history_females, :hiv_or_aids, :boolean, :default => nil
add_column :history_females, :hpv, :boolean, :default => nil

#medical
add_column :history_females, :blood_type, :string
add_column :history_females, :medical_conditions, :boolean
#medical condition table
#.........

#environmental factors


#genetic/family

#infertility tests

#past fertility treatments

end
end

0 comments on commit 5269355

Please sign in to comment.