143. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 8/4/2017 2:45:04 PM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.

143.1 Files compared

# Location File Last Modified
1 CUI-Release-v2.2.0-source.zip\CUI-Release-v2.2.0-source\spec\requests claims_spec.rb Thu Jun 15 19:04:28 2017 UTC
2 CUI-Release-v2.2.0-source.zip\CUI-Release-v2.2.0-source\spec\requests claims_spec.rb Fri Aug 4 14:58:01 2017 UTC

143.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 4 702
Changed 3 6
Inserted 0 0
Removed 0 0

143.3 Comparison options

Whitespace
Character case Differences in character case are significant
Line endings Differences in line endings (CR and LF characters) are ignored
CR/LF characters Not shown in the comparison detail

143.4 Active regular expressions

No regular expressions were active.

143.5 Comparison detail

  1   require 'r ails_helpe r'
  2  
  3   RSpec.desc ribe "Clai ms", type:  :request  do
  4     before d o
  5       @user  = create(: examiner)
  6       login_ as @user
  7       @evalu ation_spec  = create( :evaluatio n_spec)
  8       allow_ any_instan ce_of(Eval uation).to  receive(: signed?).a nd_return( true)
  9     end
  10  
  11     describe  "GET /cla ims" do
  12       contex t "when th ere are no  incomplet e claims"  do
  13         befo re do
  14           cr eate :clai m, first_n ame: 'Joe' , last_nam e: 'Vetera n', comple ted_at: Ti me.now
  15         end
  16  
  17         cont ext "when  the user i s a medica l assistan t" do
  18           be fore do
  19              @user.upda te_attribu tes(roles:  ["medical _assistant "])
  20           en d
  21  
  22           it  "should s how them a ll the cla ims in the  system un der the pr oper headi ng" do
  23              visit root _path
  24              expect(pag e).to have _content ' All claims '
  25              expect(pag e).to have _no_conten t 'Your un finished c laims'
  26              expect(pag e).to have _content ' Joe Vetera n'
  27              expect(pag e).to_not  have_conte nt "Conten tions read y for revi ew"
  28           en d
  29         end
  30  
  31         cont ext "when  the user i s not a me dical assi stant" do
  32           it  "should s how no cla ims under  the proper  heading"  do
  33              visit root _path
  34              expect(pag e).to have _no_conten t 'Your un finished c laims'
  35              expect(pag e).to have _no_conten t 'All cla ims'
  36              expect(pag e).to have _content " No incompl ete claims "
  37           en d
  38         end
  39       end
  40  
  41       contex t "when th ere are in complete c laims" do
  42         befo re do
  43           cr eate :clai m, first_n ame: 'Joe' , last_nam e: 'Vetera n'
  44           cr eate :clai m, first_n ame: 'Jane ', last_na me: 'Veter an'
  45           cr eate :clai m, first_n ame: 'Jack ', last_na me: 'Veter an', compl eted_at: T ime.now
  46         end
  47  
  48         cont ext "when  the user i s a medica l assistan t" do
  49           be fore do
  50              @user.upda te_attribu tes(roles:  ["medical _assistant "])
  51              visit root _path
  52           en d
  53  
  54           it  "should s how them a ll the cla ims in the  system un der the pr oper headi ng" do
  55              expect(pag e).to have _content ' All claims '
  56              expect(pag e).to have _no_conten t 'Your un finished c laims'
  57              expect(pag e).to have _content ' Joe Vetera n'
  58              expect(pag e).to have _content ' Jane Veter an'
  59              expect(pag e).to have _content ' Jack Veter an'
  60           en d
  61  
  62           it  "should s how a link  to create  a new cla im" do
  63              expect(pag e).to have _link 'Cre ate new cl aim', href : new_clai m_path
  64           en d
  65         end
  66  
  67         cont ext "when  the user i s a superv isor (but  not a medi cal assist ant) and t here are r esolved co ntentions"  do
  68           be fore do
  69              @superviso r = create (:supervis or)
  70              login_as @ supervisor
  71           en d
  72  
  73           af ter do
  74              login_as @ user
  75           en d
  76  
  77           it  "should s how them a ll the cla ims in the  system un der the pr oper headi ng" do
  78              visit root _path
  79              expect(pag e).to have _content ' All claims '
  80              expect(pag e).to have _no_conten t 'Your un finished c laims'
  81              expect(pag e).to have _content ' Joe Vetera n'
  82              expect(pag e).to have _content " Contention s ready fo r review"
  83           en d
  84  
  85           co ntext "and  there are  resolved  contention s" do
  86              before do
  87                @claim =  create(:c laim, firs t_name: "J oe", last_ name: "Res olved")
  88                @content ion = crea te(:conten tion, assi gner: @sup ervisor, h istory: "P atient His tory",
  89                                       claim_f older_revi ewed: true )
  90                @claim.c ontentions  << @conte ntion
  91                @evaluat ion_spec =  create(:d iabetes_sp ec)
  92                @evaluat ion = Eval uation.new (claim: @c laim, eval uation_spe c: @evalua tion_spec,  user: cre ate(:user) )
  93                @content ion.evalua tions << @ evaluation
  94                @evaluat ion.comple te! @super visor
  95                @content ion.resolv e!(@superv isor)
  96                visit ro ot_path
  97              end
  98  
  99              it "should  show the  reviewable  contentio ns table"  do
  100                expect(p age).to ha ve_content  "Contenti ons ready  for review "
  101                expect(p age).to ha ve_link @c ontention. name, href : claim_co ntention_p ath(@claim , @content ion)
  102              end
  103  
  104              it "should  show them  all the c laims in t he system  under the  proper hea ding" do
  105                expect(p age).to ha ve_content  'All clai ms'
  106                expect(p age).to ha ve_no_cont ent 'Your  unfinished  claims'
  107                expect(p age).to ha ve_content  'Joe Vete ran'
  108                expect(p age).to ha ve_content  'Jane Vet eran'
  109                expect(p age).to ha ve_content  'Jack Vet eran'
  110              end
  111  
  112              it "should  allow the  superviso r to view  the claim' s contenti on" do
  113                click_li nk 'Joe Ve teran'
  114                expect(p age).to ha ve_content  'Contenti ons'
  115                expect(p age).to ha ve_content  'Create n ew content ion'
  116              end
  117  
  118              it "should  show a li nk to crea te a new c laim" do
  119                expect(p age).to ha ve_link 'C reate new  claim', hr ef: new_cl aim_path
  120              end
  121           en d
  122         end
  123  
  124         cont ext "when  one claim  has an unf inished ev aluation"  do
  125           be fore do
  126              @evaluatio n = Evalua tion.new(c laim: @cla im, evalua tion_spec:  @evaluati on_spec, u ser: @user )
  127              Claim.firs t.evaluati ons << @ev aluation
  128           en d
  129  
  130           it  "should s how the us er only th e claim wi th that ev aluation"  do
  131              visit root _path
  132              expect(pag e).to have _content ' Your unfin ished clai ms'
  133              expect(pag e).to have _no_conten t 'All cla ims'
  134              expect(pag e).to have _link 'Joe  Veteran'
  135              expect(pag e).to have _no_conten t 'Jane Ve teran'
  136              expect(pag e).to have _no_conten t 'Jack Ve teran'
  137           en d
  138  
  139           it  "should n ot show an y claims t o a user w ithout any  evaluatio ns" do
  140              login_as c reate(:use r)
  141              visit root _path
  142              expect(pag e).to have _no_conten t 'Your un finished c laims'
  143              expect(pag e).to have _no_conten t 'All cla ims'
  144              expect(pag e).to have _no_conten t 'Joe Vet eran'
  145              expect(pag e).to have _no_conten t 'Jane Ve teran'
  146              expect(pag e).to have _no_conten t 'Jack Ve teran'
  147  
  148              # return t he login t o @user
  149              login_as @ user
  150           en d
  151         end
  152       end
  153  
  154       contex t "when th e user is  not a medi cal assist ant" do
  155         it " should not  show a li nk to crea te a new c laim" do
  156           vi sit root_p ath
  157           ex pect(page) .to have_n o_link 'Cr eate new c laim', hre f: new_cla im_path
  158         end
  159       end
  160  
  161       contex t "when th e user is  a medical  assistant"  do
  162         befo re do
  163           @u ser.roles  = ["medica l_assistan t"]
  164         end
  165  
  166         it " should sho w a link t o create a  new claim " do
  167           vi sit root_p ath
  168           ex pect(page) .to have_l ink 'Creat e new clai m', href:  new_claim_ path
  169         end
  170       end
  171     end
  172  
  173     describe  "GET /cla ims/new" d o
  174       contex t "when th e user is  not a medi cal assist ant" do
  175         it " should not  show the  user a lin k to creat e a new cl aim or let  them visi t the new  claim page " do
  176           vi sit new_cl aim_path
  177           ex pect(page) .to have_c ontent "Yo u are not  authorized  to access  this page ."
  178         end
  179       end
  180  
  181       contex t "when th e user is  a medical  assistant"  do
  182         befo re do
  183           @u ser.roles  = ["medica l_assistan t"]
  184         end
  185  
  186         cont ext "when  all fields  are fille d in" do
  187           it  "should a llow the u ser to cre ate a new  claim" do
  188              visit new_ claim_path
  189              fill_in 'F irst name' , with: 'J oe'
  190              fill_in 'L ast name',  with: 'Ve teran'
  191              fill_in 'P atient Soc ial Securi ty Number' , with: '1 23-45-6789 '
  192              fill_in 'F ile number ', with: ' 123456789'
  193              click_butt on 'Create  claim'
  194              expect(pag e).to have _content ' Claim crea ted.'
  195              expect(pag e).to have _content ' Claim: Joe  Veteran'
  196           en d
  197         end
  198  
  199         cont ext "when  required i nformation  is missin g" do
  200           it  "should d isplay an  error mess age to the  user" do
  201              visit new_ claim_path
  202              fill_in 'F irst name' , with: "J oe"
  203              fill_in 'L ast name',  with: "Ve teran"
  204              click_butt on 'Create  claim'
  205              expect(pag e).to have _content " Error crea ting claim . Patient  ssn can't  be blank F ile number  can't be  blank"
  206           en d
  207         end
  208  
  209         cont ext "when  adding a c ontention  along with  the new c laim" do
  210   #        i t "should  allow the  user to ad d any numb er of cont entions",  js: true d o
  211   #           visit new _claim_pat h
  212   #           fill_in ' First name ', with: ' Joe'
  213   #           fill_in ' Last name' , with: 'V eteran'
  214   #           fill_in ' Patient So cial Secur ity Number ', with: ' 123456789'
  215   #           fill_in ' File numbe r', with:  '123456789 '
  216   #           fill_in ' claim_cont entions_at tributes_0 _name', wi th: 'My he ad hurts'
  217   #           click_lin k 'Add ano ther conte ntion'
  218   #           fill_in ' claim_cont entions_at tributes_1 _name', wi th: 'My fa ce hurts'
  219   #           click_but ton 'Creat e claim'
  220   #           expect(pa ge).to hav e_content  'Claim cre ated'
  221   #           expect(pa ge).to hav e_content  'Claim: Jo e Veteran'
  222   #           expect(pa ge).to hav e_content  'My head h urts'
  223   #           expect(pa ge).to hav e_content  'My face h urts'
  224   #        e nd
  225  
  226           it  "should r equire the  user to i nput a nam e when add ing a cont ention" do
  227              visit new_ claim_path
  228              fill_in 'F irst name' , with: 'J oe'
  229              fill_in 'L ast name',  with: 'Ve teran'
  230              fill_in 'P atient Soc ial Securi ty Number' , with: '1 23456789'
  231              fill_in 'F ile number ', with: ' 123456789'
  232              fill_in 'c laim_conte ntions_att ributes_0_ name', wit h: 'My hea d hurts'
  233              click_butt on 'Create  claim'
  234              expect(pag e).to have _content ' Claim crea ted'
  235              expect(pag e).to have _content ' My head hu rts'
  236           en d
  237         end
  238       end
  239     end
  240  
  241     describe  "GET /cla ims/:id" d o
  242  
  243       contex t "when th e user is  an examine r" do
  244         befo re do
  245           @c laim = cre ate :claim
  246           @c laim_witho ut_exam_re quest_data  = create  :claim_wit hout_exam_ request_da ta
  247             @other_use r = create (:examiner , email: " examiner@ DNS     ", first_n ame: "An",  last_name : "Examine r")
  248         end
  249  
  250         cont ext "when  there is e xam reques t data for  the claim " do
  251  
  252           it  "should s how a link  to see th e exam req uest data"  do
  253              visit clai m_path(@cl aim)
  254              expect(pag e).to have _link 'Sho w Exam Req uest Data' , href: de tails_clai m_path(@cl aim)
  255           en d
  256  
  257           co ntext "whe n the exam iner click s on the S how Exam R equest Dat a link" do
  258              it "should  show the  exam reque st data" d o
  259                visit cl aim_path(@ claim)
  260                click_li nk 'Show E xam Reques t Data'
  261                expect(p age).to ha ve_content  "I am exa m request  data"
  262              end
  263           en d
  264         end
  265  
  266         cont ext "when  there is n o exam req uest data  for the cl aim" do
  267           it  "should n ot show a  link to ex am request  data, but  it should  show the  message Th is Claim H as No Exam  Request D ata" do
  268              visit clai m_path(@cl aim_withou t_exam_req uest_data)
  269              expect(pag e).to have _no_link ' Show Exam  Request Da ta'
  270              expect(pag e).to have _content " This claim  has no ex am request  data."
  271           en d
  272         end
  273       end
  274  
  275       contex t "when th e user is  a medical  assistant"  do
  276         befo re do
  277           @c laim = cre ate :claim
  278           @c laim_witho ut_exam_re quest_data  = create  :claim_wit hout_exam_ request_da ta
  279             @other_use r = create (:medical_ assistant,  email: "m edical_ass istant@ DNS     ", first_n ame: "Medi cal", last _name: "As sistant")
  280         end
  281  
  282         cont ext "when  there is e xam reques t data for  the claim " do
  283           it  "should s how a link  to see th e exam req uest data"  do
  284              visit clai m_path(@cl aim)
  285              expect(pag e).to have _link 'Sho w Exam Req uest Data' , href: de tails_clai m_path(@cl aim)
  286           en d
  287  
  288           co ntext "whe n the medi cal_assist ant clicks  on the Sh ow Exam Re quest Data  link" do
  289              it "should  show the  exam reque st data" d o
  290                visit cl aim_path(@ claim)
  291                click_li nk 'Show E xam Reques t Data'
  292                expect(p age).to ha ve_content  "I am exa m request  data"
  293              end
  294           en d
  295         end
  296  
  297         cont ext "when  there is n o exam req uest data  for the cl aim" do
  298           it  "should n ot show a  link to ex am request  data, but  should sh ow the mes sage This  Claim Has  No Exam Re quest Data " do
  299              visit clai m_path(@cl aim_withou t_exam_req uest_data)
  300              expect(pag e).to have _no_link ' Show Exam  Request Da ta'
  301              expect(pag e).to have _content " This claim  has no ex am request  data."
  302           en d
  303         end
  304       end
  305  
  306       contex t "when a  claim is u nresolved  and has co ntentions"  do
  307         befo re do
  308             @other_use r = create (:examiner , email: " otherdoc@ DNS     ", first_n ame: "Doc" , last_nam e: "Blue")
  309           @c laim = cre ate :claim
  310           @c laim.conte ntions <<  create(:co ntention)
  311           @c laim.conte ntions <<  create(:co ntention,  name: "My  arm hurts. ", resolve d_at: Time .now, vba_ diagnostic _code: "12 3")
  312         end
  313  
  314         cont ext "when  the conten tions have  evaluatio ns" do
  315           be fore do
  316              @claim.con tentions.f irst.evalu ations <<  Evaluation .new(evalu ation_spec : @evaluat ion_spec,  claim: @cl aim, user:  @user)
  317           en d
  318  
  319           it  "should s how a link  to edit t he evaluat ion" do
  320              visit clai m_path(@cl aim)
  321              expect(pag e).to have _link 'Sim ple Yes/No  Evaluatio n', href:  edit_claim _evaluatio n_path(@cl aim, @clai m.contenti ons.first. evaluation s.first)
  322           en d
  323  
  324           it  "should s how a link  to evalua tion activ ity" do
  325              visit clai m_path(@cl aim)
  326              expect(pag e).to have _link 'act ivity_log' , href: ac tivity_cla im_evaluat ion_path(@ claim, @cl aim.evalua tions.firs t)
  327           en d
  328  
  329           co ntext "whe n the eval uation has  been comp leted" do
  330              before do
  331                @claim.c ontentions .first.eva luations.f irst.compl ete! @othe r_user
  332              end
  333  
  334              it "should  show a li nk to a no n-editable  version o f the eval uation" do
  335                visit cl aim_path(@ claim)
  336                expect(p age).to ha ve_link 'S imple Yes/ No Evaluat ion', href : claim_ev aluation_p ath(@claim , @claim.c ontentions .first.eva luations.f irst)
  337              end
  338           en d
  339         end
  340  
  341         it " should sho w the clai m, and lin k to all c ontentions " do
  342           vi sit claim_ path(@clai m)
  343           ex pect(page) .to have_c ontent "Cl aim: #{@cl aim.patien t_name} #{ @claim.cre ated_at.to _date}"
  344           ex pect(page) .to have_c ontent "SS N: #{@clai m.masked_s sn}"
  345           ex pect(page) .to have_c ontent "Co ntentions"
  346           ex pect(page) .to have_l ink @claim .contentio ns.first.n ame, href:  claim_con tention_pa th(@claim,  @claim.co ntentions. first)
  347           ex pect(page) .to have_c ontent "Ex am Iner"
  348           ex pect(page) .to have_c ontent "Un resolved"
  349           ex pect(page) .to have_l ink @claim .contentio ns.last.na me, href:  claim_cont ention_pat h(@claim,  @claim.con tentions.l ast)
  350           ex pect(page) .to have_c ontent "Re solved"
  351         end
  352       end
  353     end
  354   end