Permalink
Browse files

in progress

  • Loading branch information...
1 parent 94f5283 commit f1f046952d3688d9b9cdcc7f0c72c4c7d5ba1240 @MikeBlyth committed Jan 21, 2013
Showing with 60 additions and 59 deletions.
  1. +1 −1 app/helpers/selectable_items_helper.rb
  2. +59 −58 app/views/visits/_form.html.haml
@@ -19,7 +19,7 @@ def check_boxes(record, section_name, columns=4) # section is attribute name fo
label = label_tag :visit, field.to_label
box = check_box_tag("visit[#{section_name}][#{field.name}]", 1, record.send(section_name)[field.name])
comment = field.with_comment ? text_field_tag("visit[#{section_name}][#{field.name}_comment]") : nil
- row_contents << content_tag(:td, box+label+comment)
+ row_contents << content_tag(:td, label+box+comment)
end
end
table_contents << content_tag(:tr, row_contents)
@@ -3,92 +3,93 @@
%legend= "Current information for #{patient_name_link(patient)}".html_safe
= render(:partial => '/shared/medinfo', :object => patient, as: :patient)
= render(:partial => 'shared/problem_list', :object => patient )
-= simple_form_for @visit, {url: {patient_id: patient.id},
- :html => { :class => 'form-horizontal' } } do |form|
+= simple_form_for @visit, {url: {patient_id: patient.id} } do |form|
%fieldset
%legend Visit info
- .row-fluid
- .span3= form.input :date, as: :string
+ .controls-row.controls
+ .span3.input-mini= form.input :date, as: :string, :input_html=>{:class=>'input-medium'}
.span3= form.association :provider
- .span2= form.input :scheduled, label: 'Scheduled?'
- .span2= form.input :newpt, label: 'New patient?'
- .span1= form.input :adm, label: 'Admitted?'
+ .span2= form.input :scheduled, label: 'Scheduled?', :input_html=>{:class=>'input-mini'}
+ .span2= form.input :newpt, label: 'New patient?', :input_html=>{:class=>'input-mini'}
+ .span1= form.input :adm, label: 'Admitted?', :input_html=>{:class=>'input-mini'}
%fieldset
%legend Vital Signs
- .row-fluid
- .span2= form.input :weight
- .span2= form.input :height
- .span2= form.input :head_circ
- .span2= form.input :mid_arm_circ
- .row-fluid
- .span2= form.input :temperature
- .span2= form.input :heart_rate
- .span2= form.input :resp_rate
- .span2= form.input :sbp, label: 'SBP'
- .span2= form.input :dbp, label: 'DBP'
+ .controls-row.controls
+ .span2= form.input :weight, :input_html=>{:class=>'input-mini'}
+ .span2= form.input :height, :input_html=>{:class=>'input-mini'}
+ .span2= form.input :head_circ, :input_html=>{:class=>'input-mini'}
+ .span2= form.input :mid_arm_circ, :input_html=>{:class=>'input-mini'}
+ .controls-row.controls
+ .span2= form.input :temperature, :input_html=>{:class=>'input-mini'}
+ .span2= form.input :heart_rate, :input_html=>{:class=>'input-mini'}
+ .span2= form.input :resp_rate , :input_html=>{:class=>'input-mini'}
+ .span2= form.input :sbp, label: 'SBP' , :input_html=>{:class=>'input-mini'}
+ .span2= form.input :dbp, label: 'DBP' , :input_html=>{:class=>'input-mini'}
%fieldset
%legend History
- .row-fluid
- .span6= form.input :hpi, label: "History of present illness",
- input_html: {rows: '1', columns: '80', style: 'width: 350px'}
+ .controls-row.controls
+ .span8= form.input :hpi, label: "History of present illness",
+ input_html: {rows: '1', class: "input-block-level"}
%h4 Signs and Symptoms
- .row-fluid
+ .controls-row.controls
.span10= check_boxes(@visit, :symptoms, 3)
- .row-fluid
- = form.input :other_symptoms
+ .controls-row.controls
+ .span6= form.input :other_symptoms, input_html: { class: "input-block-level"}
%fieldset
%legend Physical Exam
%p.form_instruction Tick box if this part of exam is normal.
= check_boxes(@visit, :physical)
- .row-fluid
- .span6= form.input :phys_exam, input_html: {rows: '1', columns: '80', style: 'width: 350px'}
+ .controls
+ .span6= form.input :phys_exam, input_html: {rows: '1', class: "input-block-level"}
%fieldset
%legend Assessment and Diagnosis
- = check_boxes(@visit, :diagnoses)
- = form.input :dx, label: 'Other diagnoses'
- = form.input :newdx, label: 'New diagnosis given?'
- .row-fluid
- .span2= form.input :assessment_stable, label: "Stable"
- .span2= form.input :assessment_oi, label: "Active OI"
- .span2= form.input :assessment_drug_toxicity, label: "Drug toxicity"
- .span2= form.input :assessment_nonadherence, label: "Nonadherence"
- .row-fluid
- .span6= form.input :assessment, input_html: {rows: '1', columns: '80', style: 'width: 350px'}
+ .controls-row.controls
+ = check_boxes(@visit, :diagnoses)
+ .controls-row.controls
+ .span6= form.input :dx, label: 'Other diagnoses', :input_html=>{:class=>'input-xlarge'}
+ .span4= form.input :newdx, label: 'New diagnosis given?', :input_html=>{:class=>'input-mini'}
+ .controls-row.controls
+ .span2= form.input :assessment_stable, label: "Stable", :input_html=>{:class=>'input-mini'}
+ .span2= form.input :assessment_oi, label: "Active OI", :input_html=>{:class=>'input-mini'}
+ .span2= form.input :assessment_drug_toxicity, label: "Drug toxicity", :input_html=>{:class=>'input-mini'}
+ .span2= form.input :assessment_nonadherence, label: "Nonadherence", :input_html=>{:class=>'input-mini'}
+ .controls-row.controls
+ .span8= form.input :assessment, input_html: {rows: '1', class: "input-block-level"}
%fieldset
%legend Other
- .row-fluid
- .span6= form.input :development, input_html: {rows: '1', columns: '80', style: 'width: 350px'}
- .row-fluid
- %p Diet
- .span2= form.input :diet_breast, label: 'Breast'
- .span2= form.input :diet_breastmilk_substitute, label: 'Breast subst.'
- .span2= form.input :diet_pap, label: 'Pap'
- .span2= form.input :diet_solids, label: 'Solids'
- .row-fluid
- .span4= form.input :meds
- .span4= form.input :comments
- .span2= form.input :anti_tb_status
+ .controls-row.controls
+ .span6= form.input :development, input_html: {rows: '1', class: "input-block-level"}
+ .controls-row.controls
+ .span2= form.input :diet_breast, label: 'Breast', :input_html=>{:class=>'input-mini'}
+ .span2= form.input :diet_breastmilk_substitute, label: 'Breast subst.' , :input_html=>{:class=>'input-mini'}
+ .span2= form.input :diet_pap, label: 'Pap', :input_html=>{:class=>'input-mini'}
+ .span2= form.input :diet_solids, label: 'Solids', :input_html=>{:class=>'input-mini'}
+ .controls-row.controls
+ .span4= form.input :meds
+ .span4= form.input :comments
+ .span2= form.input :anti_tb_status, label: 'Anti-TB status'
%fieldset
%legend HIV related
- .span2= form.input :hiv_stage
- .span2= form.input :arv_status
- .span2= form.input :arv_missed
- .span2= form.input :arv_missed_week
- .row-fluid
- .span2= render(:partial => 'arv_regimen', object: @visit )
+ .controls-row.controls
+ .span2= form.input :hiv_stage, :input_html=>{:class=>'input-mini'}
+ .span2= form.input :arv_status, :input_html=>{:class=>'input-mini'}
+ .span2= form.input :arv_missed, :input_html=>{:class=>'input-mini'}
+ .span3= form.input :arv_missed_week, label: 'ARV missed weeks', :input_html=>{:class=>'input-mini'}
+ .controls-row.controls
+ .span12= render(:partial => 'arv_regimen', object: @visit )
%fieldset
%legend Plan
- .row-fluid
- .span6= form.input :plan, input_html: {rows: '1', columns: '80', style: 'width: 350px'}
- .span4= form.input :next_visit, as: :string, label: 'Next visit (add js buttons to give choices)'
+ .controls-row.controls
+ .span6= form.input :plan, input_html: {rows: '1', class: "input-block-level"}
+ .span6= form.input :next_visit, as: :string, label: 'Next visit (add js buttons to give choices)'
%hr
= form.error :base
= form.submit
= link_to "Cancel", request.referer
-%p Add JS validation for HIV pts
+

0 comments on commit f1f0469

Please sign in to comment.