Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: MikeBlyth/ptbase
...
head fork: MikeBlyth/ptbase
Checking mergeability… Don't worry, you can still create the pull request.
  • 2 commits
  • 5 files changed
  • 0 commit comments
  • 1 contributor
View
6 app/helpers/selectable_items_helper.rb
@@ -16,15 +16,15 @@ def check_boxes(record, section_name, columns=4) # section is attribute name fo
field = fields[i]
unless i >= fields.count
#box = check_box :visit, field.to_tag
- box = check_box_tag("visit[#{section_name}][#{field.name}]", 1, record.send(section_name)[field.name])
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)
end
- return content_tag(:table, table_contents)
+ return content_tag(:table, table_contents, {class: 'table-striped', style: 'width: 100%'})
end
def selections_to_string(record, section_name)
View
116 app/views/visits/_form.html.haml
@@ -3,75 +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}} do |form|
+= simple_form_for @visit, {url: {patient_id: patient.id} } do |form|
%fieldset
%legend Visit info
- = form.input :date, as: :string
- = form.input :scheduled, label: 'Scheduled visit?'
- = form.input :next_visit, as: :string, label: 'Next visit (add js buttons to give choices)'
- = form.association :provider
- = form.input :newpt, label: 'New patient?'
- = form.input :adm, label: 'Admitted?'
+ .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?', :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
- = form.input :weight
- = form.input :height
- = form.input :head_circ
- = form.input :mid_arm_circ
- = form.input :temperature
- = form.input :resp_rate
- = form.input :heart_rate
- = form.input :sbp
- = form.input :dbp
-
- %fieldset
- %legend Signs and Symptoms
- = check_boxes(@visit, :symptoms)
+ .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
- = form.input :hpi, label: "History of present illness"
+ .controls-row.controls
+ .span8= form.input :hpi, label: "History of present illness",
+ input_html: {rows: '1', class: "input-block-level"}
+ %h4 Signs and Symptoms
+ .controls-row.controls
+ .span10= check_boxes(@visit, :symptoms, 3)
+ .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)
- %br
- = text_area 'visit', 'phys_exam', {:rows => '1', :cols => '70' }
+ .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?'
- %br
- = form.input :assessment_stable, label: "Stable"
- = form.input :assessment_oi, label: "Active OI"
- = form.input :assessment_drug_toxicity, label: "Drug toxicity"
- = form.input :assessment_nonadherence, label: "Nonadherence"
- = form.input :assessment
+ .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
- = form.input :development
- = form.input :diet_breast
- = form.input :diet_breastmilk_substitute
- = form.input :diet_pap
- = form.input :diet_solids
-
- = form.input :meds
- = form.input :plan
- = form.input :comments
-
- = 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
- = form.input :hiv_stage
- = form.input :arv_status
- = form.input :arv_missed
- = form.input :arv_missed_week
- = 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
+ .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
+
View
4 config/initializers/simple_form.rb
@@ -52,7 +52,7 @@
# Defaults to :nested for bootstrap config.
# :inline => input + label
# :nested => label > input
- config.boolean_style = :nested
+ config.boolean_style = :inline
# Default class for buttons
config.button_class = 'btn'
@@ -129,7 +129,7 @@
# config.country_priority = nil
#Default size for text inputs.
- config.default_input_size = 30
+ config.default_input_size = 25
# When false, do not use translations for labels.
# config.translate_labels = true
View
5 db/migrate/20130120192230_add_other_sx_to_visit.rb
@@ -0,0 +1,5 @@
+class AddOtherSxToVisit < ActiveRecord::Migration
+ def change
+ add_column :visits, :other_symptoms, :string
+ end
+end
View
7 db/structure.sql
@@ -945,7 +945,8 @@ CREATE TABLE visits (
arv_regimen character varying(255),
symptoms hstore,
physical hstore,
- diagnoses hstore
+ diagnoses hstore,
+ other_symptoms character varying(255)
);
@@ -1460,4 +1461,6 @@ INSERT INTO schema_migrations (version) VALUES ('20130119195813');
INSERT INTO schema_migrations (version) VALUES ('20130119210742');
-INSERT INTO schema_migrations (version) VALUES ('20130120135959');
+INSERT INTO schema_migrations (version) VALUES ('20130120135959');
+
+INSERT INTO schema_migrations (version) VALUES ('20130120192230');

No commit comments for this range

Something went wrong with that request. Please try again.