-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
# This is a combination of 2 commits.
# This is the 1st commit message: Update BRIEFF.BFHA when hearing disposition is changed # This is the commit message #2: Better names
- Loading branch information
aroltsch
committed
Aug 1, 2017
1 parent
8419237
commit 335176a
Showing
4 changed files
with
58 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
module HearingMapper | ||
def self.bfha_vacols_code(hearing_record, case_record) | ||
case hearing_record.hearing_disp | ||
when "H" | ||
return "1" if case_record.bfhr == "1" | ||
return "2" if case_record.bfhr == "2" && case_record.bfdocind != "V" | ||
return "6" if case_record.bfhr == "2" && case_record.bfdocind == "V" | ||
when "P" | ||
nil | ||
when "C" | ||
"5" | ||
else | ||
"5" | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
describe HearingMapper do | ||
context ".bfha_vacols_code" do | ||
let(:hearing) do | ||
OpenStruct.new( | ||
folder_nr: "123C", | ||
hearing_disp: hearing_disp, | ||
) | ||
end | ||
|
||
let(:brieff) do | ||
OpenStruct.new(bfhr: bfhr, bfdocind: bfdocind) | ||
end | ||
|
||
subject { HearingMapper.bfha_vacols_code(hearing, brieff) } | ||
|
||
context "when disposition is held and it is central office hearing" do | ||
let(:hearing_disp) { "H" } | ||
let(:bfhr) { "1" } | ||
let(:bfdocind) { nil } | ||
|
||
it { is_expected.to eq "1" } | ||
end | ||
|
||
context "when disposition is held and it is video hearing" do | ||
let(:hearing_disp) { "H" } | ||
let(:bfhr) { "2" } | ||
let(:bfdocind) { "V" } | ||
|
||
it { is_expected.to eq "6" } | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
|