Skip to content

Instantly share code, notes, and snippets.

@jdee
Created September 7, 2010 17:21
Show Gist options
  • Save jdee/568700 to your computer and use it in GitHub Desktop.
Save jdee/568700 to your computer and use it in GitHub Desktop.
bundle exec cucumber -p standard features/standard/web_api_cmrs_client.feature:7
Using the standard profile...
/home/jdee/.rvm/gems/jruby-1.5.2/gems/rails-2.3.5/lib/rails/gem_dependency.rb:119:Warning: Gem::Dependency#version_requirements is deprecated and will be removed on or after August 2010. Use #requirement
/home/jdee/github/csinitiative/trisano/webapp/features/support/hl7_messages.rb:18 warning: already initialized constant HL7MESSAGES
Feature: Web API Cmrs Client
To create and modify morbidity reports programmatically
An interface is needed that can be integrated into code
@ignore_plugin_renderers
Scenario: Create CMR # features/standard/web_api_cmrs_client.feature:7
Given the following active diseases: # features/standard_step_definitions/disease_steps.rb:14
| Disease name |
| AIDS |
When I visit the cmrs new page # features/standard_step_definitions/web_api_cmrs_client.rb:18
And I fill out the form field "morbidity_event[interested_party_attributes][person_entity_attributes][person_attributes][first_name]" with "David" # features/standard_step_definitions/web_api_people_client.rb:76
Could not find field: "morbidity_event[interested_party_attributes][person_entity_attributes][person_attributes][first_name]" (Webrat::NotFoundError)
./features/standard_step_definitions/web_api_people_client.rb:77:in `/^I fill out the form field "(.+?)" with "(.+?)"$/'
features/standard/web_api_cmrs_client.feature:13:in `And I fill out the form field "morbidity_event[interested_party_attributes][person_entity_attributes][person_attributes][first_name]" with "David"'
And I fill out the form field "morbidity_event[interested_party_attributes][person_entity_attributes][person_attributes][middle_name]" with "Ryan" # features/standard_step_definitions/web_api_people_client.rb:76
And I fill out the form field "morbidity_event[interested_party_attributes][person_entity_attributes][person_attributes][last_name]" with "Black" # features/standard_step_definitions/web_api_people_client.rb:76
And I fill out the form field "morbidity_event[interested_party_attributes][person_entity_attributes][person_attributes][birth_date]" with "11-10-1980" # features/standard_step_definitions/web_api_people_client.rb:76
And I fill out the form field "morbidity_event[parent_guardian]" with "Gerard Black" # features/standard_step_definitions/web_api_people_client.rb:76
And I fill out the form field "morbidity_event[interested_party_attributes][person_entity_attributes][person_attributes][approximate_age_no_birthday]" with "28" # features/standard_step_definitions/web_api_people_client.rb:76
And I select "Male" from "morbidity_event[interested_party_attributes][person_entity_attributes][person_attributes][birth_gender_id]" # features/standard_step_definitions/webrat_steps.rb:43
And I select "Unknown" from "morbidity_event[interested_party_attributes][person_entity_attributes][person_attributes][ethnicity_id]" # features/standard_step_definitions/webrat_steps.rb:43
And I select "White" from "morbidity_event[interested_party_attributes][person_entity_attributes][race_ids][]" # features/standard_step_definitions/webrat_steps.rb:43
And I select "English" from "morbidity_event[interested_party_attributes][person_entity_attributes][person_attributes][primary_language_id]" # features/standard_step_definitions/webrat_steps.rb:43
And I fill out the form field "morbidity_event[address_attributes][street_number]" with "12" # features/standard_step_definitions/web_api_people_client.rb:76
And I fill out the form field "morbidity_event[address_attributes][street_name]" with "East" # features/standard_step_definitions/web_api_people_client.rb:76
And I fill out the form field "morbidity_event[address_attributes][unit_number]" with "448" # features/standard_step_definitions/web_api_people_client.rb:76
And I fill out the form field "morbidity_event[address_attributes][city]" with "Greenville" # features/standard_step_definitions/web_api_people_client.rb:76
And I select "Utah" from "morbidity_event[address_attributes][state_id]" # features/standard_step_definitions/webrat_steps.rb:43
And I select "Rich" from "morbidity_event[address_attributes][county_id]" # features/standard_step_definitions/webrat_steps.rb:43
And I fill out the form field "morbidity_event[address_attributes][postal_code]" with "16125" # features/standard_step_definitions/web_api_people_client.rb:76
And I select "Home" from "morbidity_event[interested_party_attributes][person_entity_attributes][telephones_attributes][0][entity_location_type_id]" # features/standard_step_definitions/webrat_steps.rb:43
And I fill out the form field "morbidity_event[interested_party_attributes][person_entity_attributes][telephones_attributes][0][area_code]" with "724" # features/standard_step_definitions/web_api_people_client.rb:76
And I fill out the form field "morbidity_event[interested_party_attributes][person_entity_attributes][telephones_attributes][0][phone_number]" with "5882300" # features/standard_step_definitions/web_api_people_client.rb:76
And I fill out the form field "morbidity_event[interested_party_attributes][person_entity_attributes][telephones_attributes][0][extension]" with "23" # features/standard_step_definitions/web_api_people_client.rb:76
And I fill out the form field "morbidity_event[interested_party_attributes][person_entity_attributes][email_addresses_attributes][0][email_address]" with "foo@bar.com" # features/standard_step_definitions/web_api_people_client.rb:76
And I select "AIDS" from "morbidity_event[disease_event_attributes][disease_id]" # features/standard_step_definitions/webrat_steps.rb:43
And I fill out the form field "morbidity_event[disease_event_attributes][disease_onset_date]" with "1-1-2000" # features/standard_step_definitions/web_api_people_client.rb:76
And I fill out the form field "morbidity_event[disease_event_attributes][date_diagnosed]" with "1-2-2000" # features/standard_step_definitions/web_api_people_client.rb:76
And I select "Yes" from "morbidity_event[disease_event_attributes][hospitalized_id]" # features/standard_step_definitions/webrat_steps.rb:43
And I select "Beaver Valley Hospital" from "morbidity_event[hospitalization_facilities_attributes][0][secondary_entity_id]" # features/standard_step_definitions/webrat_steps.rb:43
And I fill out the form field "morbidity_event[hospitalization_facilities_attributes][0][hospitals_participation_attributes][admission_date]" with "1-3-2000" # features/standard_step_definitions/web_api_people_client.rb:76
And I fill out the form field "morbidity_event[hospitalization_facilities_attributes][0][hospitals_participation_attributes][discharge_date]" with "1-4-2000" # features/standard_step_definitions/web_api_people_client.rb:76
And I fill out the form field "morbidity_event[hospitalization_facilities_attributes][0][hospitals_participation_attributes][medical_record_number]" with "433" # features/standard_step_definitions/web_api_people_client.rb:76
And I select "Yes" from "morbidity_event[disease_event_attributes][died_id]" # features/standard_step_definitions/webrat_steps.rb:43
And I fill out the form field "morbidity_event[interested_party_attributes][person_entity_attributes][person_attributes][date_of_death]" with "1-30-2000" # features/standard_step_definitions/web_api_people_client.rb:76
And I select "Yes" from "morbidity_event[interested_party_attributes][risk_factor_attributes][pregnant_id]" # features/standard_step_definitions/webrat_steps.rb:43
And I set the pregnancy due date to some future date # features/standard_step_definitions/web_api_people_client.rb:80
And I select "Yes" from "morbidity_event[interested_party_attributes][treatments_attributes][0][treatment_given_yn_id]" # features/standard_step_definitions/webrat_steps.rb:43
And I fill out the form field "morbidity_event[interested_party_attributes][treatments_attributes][0][treatment_name]" with "MyTreatment" # features/standard_step_definitions/web_api_people_client.rb:76
And I fill out the form field "morbidity_event[interested_party_attributes][treatments_attributes][0][treatment_date]" with "1-6-2000" # features/standard_step_definitions/web_api_people_client.rb:76
And I fill out the form field "morbidity_event[interested_party_attributes][treatments_attributes][0][stop_treatment_date]" with "1-7-2000" # features/standard_step_definitions/web_api_people_client.rb:76
And I fill out the form field "morbidity_event[clinicians_attributes][0][person_entity_attributes][person_attributes][first_name]" with "Sam" # features/standard_step_definitions/web_api_people_client.rb:76
And I fill out the form field "morbidity_event[clinicians_attributes][0][person_entity_attributes][person_attributes][middle_name]" with "R" # features/standard_step_definitions/web_api_people_client.rb:76
And I fill out the form field "morbidity_event[clinicians_attributes][0][person_entity_attributes][person_attributes][last_name]" with "Burke" # features/standard_step_definitions/web_api_people_client.rb:76
And I select "Home" from "morbidity_event[clinicians_attributes][0][person_entity_attributes][telephones_attributes][0][entity_location_type_id]" # features/standard_step_definitions/webrat_steps.rb:43
And I fill out the form field "morbidity_event[clinicians_attributes][0][person_entity_attributes][telephones_attributes][0][area_code]" with "703" # features/standard_step_definitions/web_api_people_client.rb:76
And I fill out the form field "morbidity_event[clinicians_attributes][0][person_entity_attributes][telephones_attributes][0][phone_number]" with "2654321" # features/standard_step_definitions/web_api_people_client.rb:76
And I fill out the form field "morbidity_event[clinicians_attributes][0][person_entity_attributes][telephones_attributes][0][extension]" with "808" # features/standard_step_definitions/web_api_people_client.rb:76
And I fill out the form field "morbidity_event[contact_child_events_attributes][0][interested_party_attributes][person_entity_attributes][person_attributes][first_name]" with "Jen" # features/standard_step_definitions/web_api_people_client.rb:76
And I fill out the form field "morbidity_event[contact_child_events_attributes][0][interested_party_attributes][person_entity_attributes][person_attributes][last_name]" with "Dubbs" # features/standard_step_definitions/web_api_people_client.rb:76
And I select "Other" from "morbidity_event[contact_child_events_attributes][0][participations_contact_attributes][disposition_id]" # features/standard_step_definitions/webrat_steps.rb:43
And I select "Other" from "morbidity_event[contact_child_events_attributes][0][participations_contact_attributes][contact_type_id]" # features/standard_step_definitions/webrat_steps.rb:43
And I select "Home" from "morbidity_event[contact_child_events_attributes][0][interested_party_attributes][person_entity_attributes][telephones_attributes][0][entity_location_type_id]" # features/standard_step_definitions/webrat_steps.rb:43
And I fill out the form field "morbidity_event[contact_child_events_attributes][0][interested_party_attributes][person_entity_attributes][telephones_attributes][0][area_code]" with "412" # features/standard_step_definitions/web_api_people_client.rb:76
And I fill out the form field "morbidity_event[contact_child_events_attributes][0][interested_party_attributes][person_entity_attributes][telephones_attributes][0][phone_number]" with "2652222" # features/standard_step_definitions/web_api_people_client.rb:76
And I fill out the form field "morbidity_event[contact_child_events_attributes][0][interested_party_attributes][person_entity_attributes][telephones_attributes][0][extension]" with "98" # features/standard_step_definitions/web_api_people_client.rb:76
And I select "Yes" from "morbidity_event[interested_party_attributes][risk_factor_attributes][food_handler_id]" # features/standard_step_definitions/webrat_steps.rb:43
And I select "Yes" from "morbidity_event[interested_party_attributes][risk_factor_attributes][healthcare_worker_id]" # features/standard_step_definitions/webrat_steps.rb:43
And I select "Yes" from "morbidity_event[interested_party_attributes][risk_factor_attributes][group_living_id]" # features/standard_step_definitions/webrat_steps.rb:43
And I select "Yes" from "morbidity_event[interested_party_attributes][risk_factor_attributes][day_care_association_id]" # features/standard_step_definitions/webrat_steps.rb:43
And I fill out the form field "morbidity_event[interested_party_attributes][risk_factor_attributes][occupation]" with "Pizza Delivery Guy" # features/standard_step_definitions/web_api_people_client.rb:76
And I select "Unknown" from "morbidity_event[imported_from_id]" # features/standard_step_definitions/webrat_steps.rb:43
And I fill out the form field "morbidity_event[interested_party_attributes][risk_factor_attributes][risk_factors]" with "Bad factor" # features/standard_step_definitions/web_api_people_client.rb:76
And I fill out the form field "morbidity_event[interested_party_attributes][risk_factor_attributes][risk_factors_notes]" with "Bad factor notes" # features/standard_step_definitions/web_api_people_client.rb:76
And I fill out the form field "morbidity_event[other_data_1]" with "other data 1" # features/standard_step_definitions/web_api_people_client.rb:76
And I fill out the form field "morbidity_event[other_data_2]" with "other data 2" # features/standard_step_definitions/web_api_people_client.rb:76
And I fill out the form field "morbidity_event[reporter_attributes][person_entity_attributes][person_attributes][first_name]" with "David" # features/standard_step_definitions/web_api_people_client.rb:76
And I fill out the form field "morbidity_event[reporter_attributes][person_entity_attributes][person_attributes][last_name]" with "Jenkins" # features/standard_step_definitions/web_api_people_client.rb:76
And I fill out the form field "morbidity_event[reporter_attributes][person_entity_attributes][telephones_attributes][0][area_code]" with "999" # features/standard_step_definitions/web_api_people_client.rb:76
And I fill out the form field "morbidity_event[reporter_attributes][person_entity_attributes][telephones_attributes][0][phone_number]" with "9999999" # features/standard_step_definitions/web_api_people_client.rb:76
And I fill out the form field "morbidity_event[reporter_attributes][person_entity_attributes][telephones_attributes][0][extension]" with "999" # features/standard_step_definitions/web_api_people_client.rb:76
And I fill out the form field "morbidity_event[results_reported_to_clinician_date]" with "1-20-2000" # features/standard_step_definitions/web_api_people_client.rb:76
And I fill out the form field "morbidity_event[first_reported_PH_date]" with "1-21-2000" # features/standard_step_definitions/web_api_people_client.rb:76
And I select "Unknown" from "morbidity_event[lhd_case_status_id]" # features/standard_step_definitions/webrat_steps.rb:43
And I select "Unknown" from "morbidity_event[state_case_status_id]" # features/standard_step_definitions/webrat_steps.rb:43
And I select "Unknown" from "morbidity_event[outbreak_associated_id]" # features/standard_step_definitions/webrat_steps.rb:43
And I fill out the form field "morbidity_event[outbreak_name]" with "outbreak name" # features/standard_step_definitions/web_api_people_client.rb:76
And I fill out the form field "morbidity_event[event_name]" with "event name" # features/standard_step_definitions/web_api_people_client.rb:76
And I fill out the form field "morbidity_event[acuity]" with "1" # features/standard_step_definitions/web_api_people_client.rb:76
And I press "Save & Exit" # features/standard_step_definitions/webrat_steps.rb:31
Then I should see "CMR was successfully created" # features/standard_step_definitions/webrat_steps.rb:110
Failing Scenarios:
cucumber -p standard features/standard/web_api_cmrs_client.feature:7 # Scenario: Create CMR
1 scenario (1 failed)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment