|
1019 | 1019 | end |
1020 | 1020 | end |
1021 | 1021 |
|
| 1022 | + shared_examples "when Mavis columns are present, which the bulk upload should ignore" do |
| 1023 | + let(:data) do |
| 1024 | + valid_bulk_flu_data.merge( |
| 1025 | + { |
| 1026 | + "PROGRAMME" => "HPV", |
| 1027 | + "PERFORMING_PROFESSIONAL_EMAIL" => "abc123@example.com", |
| 1028 | + "NOTES" => "Here are some notes", |
| 1029 | + "CARE_SETTING" => 2, |
| 1030 | + "CLINIC_NAME" => "The Hog's Head", |
| 1031 | + "SESSION_ID" => 1, |
| 1032 | + "UUID" => "ABCD1234-26cc-44e4-b886-c3cc90ba01b6", |
| 1033 | + "REASON_NOT_VACCINATED" => "Unwell", |
| 1034 | + "Vaccination type" => "HPV 1", |
| 1035 | + "EVENT_LOCATION_TYPE" => "school", |
| 1036 | + "SUPPLIER_EMAIL" => "abc@example.com" |
| 1037 | + } |
| 1038 | + ) |
| 1039 | + end |
| 1040 | + |
| 1041 | + it "ignores the Mavis columns" do |
| 1042 | + expect(immunisation_import_row).to be_valid |
| 1043 | + end |
| 1044 | + end |
| 1045 | + |
1022 | 1046 | context "of unknown type (no VACCINE_GIVEN)" do |
1023 | 1047 | context "with an empty row" do |
1024 | 1048 | let(:data) { {} } |
|
1096 | 1120 | end |
1097 | 1121 |
|
1098 | 1122 | include_examples "when `VACCINATED` is `N`" |
| 1123 | + |
| 1124 | + include_examples "when Mavis columns are present, which the bulk upload should ignore" |
1099 | 1125 | end |
1100 | 1126 |
|
1101 | 1127 | context "of type hpv" do |
|
1127 | 1153 | end |
1128 | 1154 |
|
1129 | 1155 | include_examples "when `VACCINATED` is `N`" |
| 1156 | + |
| 1157 | + include_examples "when Mavis columns are present, which the bulk upload should ignore" |
1130 | 1158 | end |
1131 | 1159 | end |
1132 | 1160 | end |
|
2311 | 2339 | "CARE_SETTING" => 2, |
2312 | 2340 | "CLINIC_NAME" => "The Hog's Head", |
2313 | 2341 | "SESSION_ID" => session.id, |
2314 | | - "UUID" => "ABCD1234-26cc-44e4-b886-c3cc90ba01b6" |
| 2342 | + "UUID" => "ABCD1234-26cc-44e4-b886-c3cc90ba01b6", |
| 2343 | + "REASON_NOT_VACCINATED" => "Unwell", |
| 2344 | + "Vaccination type" => "HPV 1", |
| 2345 | + "EVENT_LOCATION_TYPE" => "school", |
| 2346 | + "SUPPLIER_EMAIL" => "abc@example.com" |
2315 | 2347 | } |
2316 | 2348 | ) |
2317 | 2349 | end |
|
2331 | 2363 | its(:notes) { should be_nil } |
2332 | 2364 |
|
2333 | 2365 | its(:location) { should eq location } |
| 2366 | + its(:location_name) { should be_nil } |
2334 | 2367 |
|
2335 | 2368 | its(:session) { should be_nil } |
2336 | 2369 |
|
2337 | 2370 | its(:uuid) { should_not eq "ABCD1234-26cc-44e4-b886-c3cc90ba01b6" } |
| 2371 | + |
| 2372 | + its(:supplied_by) { should be_nil } |
2338 | 2373 | end |
2339 | 2374 |
|
2340 | 2375 | include_examples "accepts a VACCINE_GIVEN code", |
|
2416 | 2451 | "CARE_SETTING" => 2, |
2417 | 2452 | "CLINIC_NAME" => "The Hog's Head", |
2418 | 2453 | "SESSION_ID" => session.id, |
2419 | | - "UUID" => "ABCD1234-26cc-44e4-b886-c3cc90ba01b6" |
| 2454 | + "UUID" => "ABCD1234-26cc-44e4-b886-c3cc90ba01b6", |
| 2455 | + "REASON_NOT_VACCINATED" => "Unwell", |
| 2456 | + "Vaccination type" => "flu 1", |
| 2457 | + "EVENT_LOCATION_TYPE" => "school", |
| 2458 | + "SUPPLIER_EMAIL" => "abc@example.com" |
2420 | 2459 | } |
2421 | 2460 | ) |
2422 | 2461 | end |
|
0 commit comments