22. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 11/16/2017 4:02:23 PM Eastern Standard 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.

22.1 Files compared

# Location File Last Modified
1 CUI-CPP-v2.3.1-release.zip\db seeds.rb Fri Oct 20 20:13:45 2017 UTC
2 CUI-CPP-v2.3.1-release.zip\db seeds.rb Tue Nov 14 16:16:38 2017 UTC

22.2 Comparison summary

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

22.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

22.4 Active regular expressions

No regular expressions were active.

22.5 Comparison detail

  1   # db/seeds .rb
  2   # This fil e is execu ted during  `rake db: reset` and  `db:setup ` and `db: seed` task s
  3  
  4   # If this  file is ex ecuted whe n the RAIL S_ENV is d evelopment  it will
  5   # only see d the stat ic text fi les unless  the DBRES ET environ ment varia ble is tru e
  6   # WHen DBR ESET is tr ue and RAI LS_ENV is  developmen t, the dat abase will  have
  7   # been res et to a bl ank condit ion prior  to this fi le being e xecuted an d the
  8   # this fil e will pop ulate the  entire dev elopment d ataset.
  9  
  10   require 's eeder.rb'
  11  
  12   require 'c sv_seeder. rb'
  13   include Cs vSeeder
  14  
  15   require 's ql_seeder. rb'
  16   include Sq lSeeder
  17  
  18  
  19   ########## ########## ########## ########## ########## #######
  20   ## seed st atic text  tables fro m csv file s located  in db/csv
  21  
  22   puts "\nLo ading stat ic text ta bles."
  23  
  24   [
  25     CareCate gory,
  26     Consulta tionOrder,
  27     Consulta tionStatus ,
  28     Consulta tionType,
  29     MedicalS pecialty,
  30     OtherHea lthInsuran ce,
  31     Referral DocumentTy pe,
  32     Referral Reason,
  33     Referral Type,
  34  
  35   ].each do  |model_cla ss_name|
  36     load_sta tic_text_t able_from_ csv(klass:  model_cla ss_name,
  37       common _fields: {  deleted_a t: nil },
  38       column _mappings:  ['sequenc e','title' ],
  39       use_co py_from: f alse
  40     )
  41   end
  42  
  43   unless see d_from_sql (Visn, res et_only: f alse)
  44     load_sta tic_text_t able_from_ csv(
  45       klass:              Visn,
  46       column _mappings:  ['sequenc e','delete d_at','reg ion','name '],
  47       use_co py_from: f alse
  48     )
  49   end
  50  
  51   unless see d_from_sql (Site, res et_only: t rue)
  52     load_sta tic_text_t able_from_ csv(
  53       klass:              Site,
  54       column _mappings:   ['name', 'address', 'city','st ate','zip_ code'],
  55       common _fields:     {country : 'USA'},
  56       use_co py_from:     false
  57     )
  58   end
  59  
  60   unless see d_from_sql (Diagnosis Code, rese t_only: tr ue)
  61     load_sta tic_text_t able_from_ csv(
  62       klass:   Diagnosi sCode,
  63       column _mappings:  ['version _code','de scription' ],
  64       use_co py_from:     false
  65     )
  66   end
  67  
  68   unless see d_from_sql ( Clinic,  reset_only : true)
  69     load_sta tic_text_t able_from_ csv(
  70       klass:              Clinic,
  71       column _mappings:   ['site_i d','clinic _id','name '],
  72       use_co py_from:     false
  73     )
  74   end
  75  
  76  
  77   ### Load i ssue categ ories for  DOM-127 Re quest for  Support ## #
  78   %w[
  79     Performa nce
  80     Security
  81     Function al
  82     Access
  83     Forgot_P assword
  84     Other
  85   ].each do  |category|
  86     SupportR equestCate gory.find_ or_create_ by(name: c ategory.gs ub('_', '  ').titleca se)
  87   end
  88  
  89   org1 = Sup portReques tOrganizat ion.create (short_nam e: "C&P",  long_name: "Compensat ion and Pe nsion")
  90  
  91   org2 = Sup portReques tOrganizat ion.create (short_nam e: "CPP",  long_name: "Community  Provider  Portal")
  92  
  93   ########## ########## ########## ########## ########## ########## #
  94  
  95  
  96   ########## ########## ########## ########## ########## #######
  97   ## define  the Referr alStatus
  98  
  99   print "Loa ding stati c text for  ReferralS tatus ...  "
  100  
  101   [
  102     {
  103       status :                "new ",
  104       update _descripti on:   "",
  105       referr al_queue:        "vha _cc",   #  Only users  who have  one of the se roles w ill have t his status  in the re ferral_que ue
  106       filter able_by_ro les:  "vha _cc"    #  Only users  who have  one of the se roles w ill have t his status  in the de tail filte r pane
  107     },
  108     {
  109       status :                "pre p",
  110       update _descripti on:   "The  Referral  is being p repared fo r the Comm unity Prov ider.",
  111       referr al_queue:        "vha _cc",
  112       filter able_by_ro les:  "vha _cc"
  113     },
  114     {
  115       status :                "ass igned",
  116       update _descripti on:   "The  Referral  contains a ll medical  informati on needed  for the fi rst visit  and has be en assigne d to a Com munity Pro vider. <b> Note:</b>  The Commun tiy Provid er will re ceive a sy stem-gener ated notif ication em ail as soo n as the < b>Submit</ b> button  below is c licked.",
  117       referr al_queue:        "vha _cc, non_v ha",
  118       filter able_by_ro les:  "vha _cc, non_v ha"
  119     },
  120     {
  121       status :                "acc epted",
  122       update _descripti on:   "The  Community  Provider  has succes sfully ret urned medi cal record s for the  first appo intment. A dditional  appointmen ts and med ical docum ents are e xpected.",
  123       referr al_queue:        "non _vha",
  124       filter able_by_ro les:  "vha _cc, non_v ha"
  125     },
  126     {
  127       status :                "rev iew_pendin g",
  128       update _descripti on:   "The  Referral  has been s ent to the  VA for ap proval.",
  129       referr al_queue:        "vha _cc, non_v ha",
  130       filter able_by_ro les:  "vha _cc, non_v ha"
  131     },
  132     {
  133       status :                "inf ormation_n eeded",
  134       update _descripti on:   "The  Referral  has been r eviewed an d returned  to the Co mmunity Pr ovider wit h a reques t for addi tional inf ormation." ,
  135       referr al_queue:        "vha _cc, non_v ha",
  136       filter able_by_ro les:  "vha _cc, non_v ha"
  137     },
  138     {
  139       status :                "com plete",
  140       update _descripti on:   "The  Referral  is complet e and all  medical do cument hav e been rec eived.",
  141       referr al_queue:        "",
  142       filter able_by_ro les:  "vha _cc, non_v ha"
  143     }
  144   ].each do  |entry|
  145     Referral Status.fin d_or_creat e_by(
  146       name:                   entr y[:status] .gsub('_',  ' ').titl ecase,
  147       code:                   entr y[:status] .upcase,
  148       update _descripti on:   entr y[:update_ descriptio n],
  149       referr al_queue:        entr y[:referra l_queue].d owncase,
  150       filter able_by_ro les:  entr y[:filtera ble_by_rol es].downca se
  151     )
  152   end
  153  
  154   puts "done "
  155  
  156   ########## ########## ########## ########## ########## #######
  157   ## define  the test E xamination State
  158  
  159   print "Loa ding stati c text for  Examinati onState .. . "
  160  
  161   # FIXME: s pelling er ror: Cance led not Ca ncelled
  162   %w[
  163     Pending
  164     Ready_to _be_Schedu led
  165     Schedule d
  166     In_Progr ess
  167     Complete d
  168     Reviewed
  169     Submitte d
  170     Rejected
  171     Pending_ Cancellati on
  172     Cancelle d
  173     Reschedu le
  174   ].each do  |status|
  175     Examinat ionState.f ind_or_cre ate_by(nam e: status. gsub('_',  ' ').title case, code : status.u pcase)
  176   end
  177  
  178   puts "done "
  179  
  180  
  181   ########## ########## ########## ########## ########## #######
  182   ## define  the test E xamRequest State
  183  
  184   print "Loa ding stati c text for  ExamReque stState .. . "
  185  
  186   # FIXME: s pelling er ror Cancel ed not Can celled
  187   %w[
  188     New
  189     In_Progr ess
  190     Pending_ Reported
  191     Pending  Cancellati on
  192     Cancelle d
  193     Canceled  by MAS
  194     Canceled  by RO
  195     Complete d
  196     Complete d Printed  by RO
  197     Released  to RO Not  Printed
  198     Re-route d New
  199     Re-route d accepted
  200     Re-route d rejected
  201   ].each do  |status|
  202     ExamRequ estState.f ind_or_cre ate_by(nam e: status. gsub('_',  ' ').title case, code : status.u pcase)
  203   end
  204  
  205   puts "done "
  206  
  207  
  208   ########## ########## ########## ########## ########## #######
  209   ## define  the test C larificati onType
  210  
  211   print "Loa ding stati c text for  Clarifica tionType . .. "
  212  
  213   %w[
  214     Request
  215     Response
  216   ].each do  |status|
  217     Clarific ationType. find_or_cr eate_by(na me: status .gsub('_',  ' ').titl ecase, cod e: status. upcase)
  218   end
  219  
  220   # BEGIN
  221   # FIX-ME:  These belo w rows nee d to be th ere until  the above  three sect ions (Exam inationSta te, ExamRe questState ) are fixe d
  222   #          We are mov ing them o ur of the  if stateme nt (that r uns if you  are deplo ying in de velopment  mode), so  that the a pplication
  223   #          can be dep loyed in ' production ' mode
  224     Examinat ionState.f ind_or_cre ate_by(:na me => "Pen ding", :co de => "PEN DING")
  225     Examinat ionState.f ind_or_cre ate_by(:na me => "Rea dy to be S cheduled",  :code =>  "READY_TO_ BE_SCHEDUL ED")
  226     Examinat ionState.f ind_or_cre ate_by(:na me => "Sch eduled", : code => "S CHEDULED")
  227     Examinat ionState.f ind_or_cre ate_by(:na me => "In  Progress",  :code =>  "IN_PROGRE SS")
  228     Examinat ionState.f ind_or_cre ate_by(:na me => "Com pleted", : code => "C OMPLETED")
  229     Examinat ionState.f ind_or_cre ate_by(:na me => "Rev iewed", :c ode => "RE VIEWED")
  230     Examinat ionState.f ind_or_cre ate_by(:na me => "Sub mitted", : code => "S UBMITTED")
  231     Examinat ionState.f ind_or_cre ate_by(:na me => "Rej ected", :c ode => "RE JECTED")
  232     Examinat ionState.f ind_or_cre ate_by(:na me => "Pen ding Cance llation",  :code => " PENDING_CA NCELLATION ")
  233     Examinat ionState.f ind_or_cre ate_by(:na me => "Can celled", : code => "C ANCELLED")
  234     Examinat ionState.f ind_or_cre ate_by(:na me => "Res chedule",  :code => " RESCHEDULE ")
  235  
  236     ExamRequ estState.f ind_or_cre ate_by(:na me => "New ", :code = > "NEW")
  237     ExamRequ estState.f ind_or_cre ate_by(:na me => "In  Progress",  :code =>  "IN_PROGRE SS")
  238     ExamRequ estState.f ind_or_cre ate_by(:na me => "Pen ding, Repo rted", :co de => "PEN DING_REPOR TED")
  239     ExamRequ estState.f ind_or_cre ate_by(:na me => "Pen ding Cance llation",  :code => " PENDING_CA NCELLATION ")
  240     ExamRequ estState.f ind_or_cre ate_by(:na me => "Can celled", : code => "C ANCELLED")
  241     ExamRequ estState.f ind_or_cre ate_by(:na me => "Can celed by M AS", :code  => "CANCE LED_BY_MAS ")
  242     ExamRequ estState.f ind_or_cre ate_by(:na me => "Can celed by R O", :code  => "CANCEL ED_BY_RO")
  243     ExamRequ estState.f ind_or_cre ate_by(:na me => "Com pleted", : code => "C OMPLETED")
  244     ExamRequ estState.f ind_or_cre ate_by(:na me => "Com pleted, Pr inted by R O", :code  => "COMPLE TED_PRINTE D_BY_RO")
  245     ExamRequ estState.f ind_or_cre ate_by(:na me => "Rel eased to R O, Not Pri nted", :co de => "REL EASED_TO_R O_NOT_PRIN TED")
  246     ExamRequ estState.f ind_or_cre ate_by(:na me => "Re- routed, Ne w", :code  => "REROUT ED_NEW")
  247     ExamRequ estState.f ind_or_cre ate_by(:na me => "Re- routed, ac cepted", : code => "R EROUTED_AC CEPTED")
  248     ExamRequ estState.f ind_or_cre ate_by(:na me => "Re- routed, re jected", : code => "R EROUTED_RE JECTED")
  249  
  250     Clarific ationType. find_or_cr eate_by(:n ame => "Re quest", :c ode => "RE QUEST")
  251     Clarific ationType. find_or_cr eate_by(:n ame => "Re sponse", : code => "R ESPONSE")
  252   # END
  253  
  254   puts "done "
  255  
  256  
  257   ########## ########## ########## ########## ########## #######
  258   ## Loading  the data  from db/ec m_seeds.rb  via
  259   ## rake ev al_con_man :seed
  260   ##
  261   ## The fol lowing mod els are im pacted:
  262   ##      Di agnosisMod ifier
  263   ##      Di agnosis
  264   ##      Dm Assignment
  265   ##      Sy mptom
  266   ##      Mi norSystem
  267   ##      Ma jorSystem
  268   ##      Ev aluationTe mplate
  269  
  270  
  271   print "Inv oking rake  task eval _con_man:s eed ... "
  272   unless Eva luationTem plate.exis ts? 
  273     Rake::Ta sk["eval_c on_man:see d"].invoke
  274  
  275     puts "do ne"
  276  
  277     print "I nvoking ra ke task ev al_con_man :load_html  ..."
  278  
  279     Rake::Ta sk["eval_c on_man:loa d_html"].i nvoke
  280  
  281     puts "do ne"
  282   end
  283  
  284   ########## ########## ########## ########## ########## #######
  285   ## Loading  the data  from db/vb ms_r_fg_in it.rb via
  286   ## rake vb ms_r_fg:in it
  287   ##
  288   ## The fol lowing mod els are im pacted:
  289   ##      Vb msRFactGro up
  290  
  291   print "Inv oking rake  task vbms _r_fg:init  ... "
  292  
  293   Rake::Task ["vbms_r_f g:init"].i nvoke
  294  
  295   puts "done "
  296  
  297     ######## ########## ########## ########## ########## ########## ########## ########## #
  298     #### Sit es - The b elow 5 sit es were pr ovided ear lier in th e project
  299     #### The se sites h ave to be  created ou tside the  'developme nt' test d ata sectio n
  300     #### as  they are v alid sites
  301     #### (Th ese sites  cannot be  moved to t he sites c sv file as  they are  being used
  302     #### (Se e below fo r details  on these s ites usage )
  303     ######## ########## ########## ########## ########## ########## ########## ########## #
  304  
  305     print "C reating th e 7 additi onal sites  ... "
  306  
  307     site1 =  Site.find_ or_create_ by(
  308                  name:  "Chicago M edical Cen ter",
  309                  addres s: "1111 S ilver Aven ue",
  310                  city:  "Chicago",
  311                  state:  "IL",
  312                  zip_co de: "60611 ",
  313                  countr y: "USA")
  314  
  315     site2 =  Site.find_ or_create_ by(
  316                  name:  "Dallas VA  Clinic",
  317                  addres s: "2222 R ush Avenue ",
  318                  city:  "Dallas",
  319                  state:  "TX",
  320                  zip_co de: "75418 ",
  321                  countr y: "USA")
  322  
  323     site3 =  Site.find_ or_create_ by(
  324                  name:  "QTC",
  325                  facili ty_id: "QT C VBA Vend or",
  326                  addres s: "21700  Copley Dr. , Ste 200" ,
  327                  city:  "Diamond B ar",
  328                  state:  "CA",
  329                  zip_co de: "91765 -2219",
  330                  countr y: "USA")
  331  
  332     site4 =  Site.find_ or_create_ by(
  333                  name:  "VES",
  334                  facili ty_id: "VE S VBA Vend or",
  335                  addres s: "2707 N orth Loop  W., Suite  1000",
  336                  city:  "Houston",
  337                  state:  "TX",
  338                  zip_co de: "77008 ",
  339                  countr y: "USA")
  340  
  341     site5 =  Site.find_ or_create_ by(
  342                  name:  "VetFed",
  343                  facili ty_id: "Ve tFed VBA V endor",
  344                  addres s: "21700  Copley Dr. , Ste 200" ,
  345                  city:  "Diamond B ar",
  346                  state:  "CA",
  347                  zip_co de: "91765 -2219",
  348                  countr y: "USA")
  349  
  350     site6 =  Site.find_ or_create_ by(
  351                  name:  "Atlanta V A Medical  Center",
  352                  facili ty_id: "50 8",
  353                  addres s: "1670 C lairmont R oad",
  354                  city:  "Decatur",
  355                  state:  "GA",
  356                  zip_co de: "30033 ",
  357                  countr y: "USA")
  358  
  359     site7 =  Site.find_ or_create_ by(
  360                  name:  "CSRA ITC" ,
  361                  facili ty_id: "77 7",
  362                  addres s: "6300 T exas Ave." ,
  363                  city:  "Bossier C ity",
  364                  state:  "LA",
  365                  zip_co de: "71111 ",
  366                  countr y: "USA")
  367  
  368     puts "do ne"
  369   ########## ########## ########## ########## ########## #######
  370   ## make up  some test  data for  developmen t
  371  
  372   if Rails.e nv.develop ment?  &&   DBRESET
  373  
  374     puts "\n Loading de velopment  test data. "
  375  
  376  
  377     ######## ########## ########## ########## ########## #########
  378     ## defin e test fac ilities an d provider s
  379  
  380     unless s eed_from_s ql( Facili ty, Provid er, reset_ only: true  )
  381       puts " \n... Faci lities tab le."
  382  
  383       50.tim es do |fac ility_numb er|
  384         faci lity_recor d = Seeder ::Facility Seed.new(f acility_nu mber)
  385       end
  386  
  387       puts " \n... Prov ider table  from NPI  Registry w ith zip co des ..."
  388  
  389       zipcod es = %w[20 002 23233  71111 7350 1]
  390  
  391       zipcod es.each do  |postal_c ode|
  392         prin tf "%s ",  postal_cod e
  393         NpiR egistry.fi lter('post al_code' = > postal_c ode)
  394       end
  395       puts " done"
  396     end
  397  
  398  
  399  
  400     ######## ########## ########## ########## ########## #########
  401     ## defin e test use rs
  402  
  403     puts ".. . User tab le."
  404  
  405     medical_ assistant  = User.cre ate(
  406                  email:  "team@adh octeam.us" ,
  407                  passwo rd: "Sms!1 23456789",
  408                  first_ name: "Med ical",
  409                  last_n ame: "Assi stant",
  410                  author ization_st ate: 'auth orized',
  411                  roles:  ['medical _assistant ']) unless  User.exis ts?(email:  "team@adh octeam.us" )
  412  
  413     supervis or = User. create(
  414                  email:  "supervis or@adhocte am.us",
  415                  passwo rd: "Sms!1 23456789",
  416                  first_ name: "Sup er",
  417                  last_n ame: "Viso r",
  418                  author ization_st ate: 'auth orized',
  419                  roles:  ['supervi sor']) unl ess User.e xists?(ema il: "super visor@adho cteam.us")
  420  
  421     examiner  = User.cr eate(
  422                  email:  "examiner @adhocteam .us",
  423                  passwo rd: "Sms!1 23456789",
  424                  first_ name: "Exa m",
  425                  last_n ame: "Iner ",
  426                  author ization_st ate: 'auth orized',
  427                  roles:  ["examine r"]) unles s User.exi sts?(email : "")
  428  
  429     app_admi n = User.c reate(
  430                  email:  "samantha @smith.com ",
  431                  passwo rd: "Sms!1 23456789",
  432                  author ization_st ate: "auth orized",
  433                  first_ name: "Sam antha",
  434                  last_n ame: "Smit h",
  435                  # FIXM E: at the  end of CPP  sprint 15  these two  lines wer e removed
  436                  #         from th e integrat ion branch .  So if t hey are tr uly not ne eded,
  437                  #         come ba ck here an d delete t his dead c ode in a f uture spri nt.
  438                  # auth orization_ state: 'au thorized',
  439                  roles:  ["app_adm in"]) unle ss User.ex ists?(emai l: "samant ha@smith.c om")
  440  
  441     site_use r1 = User. create(
  442                  email:  "mike@wal lace.com",
  443                  passwo rd: "Sms!1 23456789",
  444                  author ization_st ate: "auth orized",
  445                  first_ name: "Mik e",
  446                  last_n ame: "Wall ace") unle ss User.ex ists?(emai l: "mike@w allace.com ")
  447  
  448     site_use r2 = User. create(
  449                  email:  "eric@wil son.com",
  450                  passwo rd: "Sms!1 23456789",
  451                  author ization_st ate: "auth orized",
  452                  first_ name: "Eri c",
  453                  last_n ame: "Wils on") unles s User.exi sts?(email : "eric@wi lson.com")
  454  
  455     all_role s_QTC_user  = User.cr eate(
  456                  email:  "all@qtc. com",
  457                  passwo rd: "Sms!1 23456789",
  458                  author ization_st ate: "auth orized",
  459                  first_ name: "All ",
  460                  last_n ame: "Qtc" ) unless U ser.exists ?(email: " all@qtc.co m")
  461  
  462     admin_QT C_user = U ser.create (
  463                  email:  "admin@qt c.com",
  464                  passwo rd: "Sms!1 23456789",
  465                  author ization_st ate: "auth orized",
  466                  first_ name: "Adm in",
  467                  last_n ame: "Qtc" ) unless U ser.exists ?(email: " admin@qtc. com")
  468  
  469     triage_Q TC_user =  User.creat e(
  470                  email:  "triage@q tc.com",
  471                  passwo rd: "Sms!1 23456789",
  472                  author ization_st ate: "auth orized",
  473                  first_ name: "Tri age",
  474                  last_n ame: "Qtc" ) unless U ser.exists ?(email: " triage@qtc .com")
  475  
  476     scheduli ng_QTC_use r = User.c reate(
  477                  email:  "scheduli ng@qtc.com ",
  478                  passwo rd: "Sms!1 23456789",
  479                  author ization_st ate: "auth orized",
  480                  first_ name: "Sch eduling",
  481                  last_n ame: "Qtc" ) unless U ser.exists ?(email: " scheduling @qtc.com")
  482  
  483     clinicia n_QTC_user  = User.cr eate(
  484                  email:  "clinicia n@qtc.com" ,
  485                  passwo rd: "Sms!1 23456789",
  486                  author ization_st ate: "auth orized",
  487                  first_ name: "Cli nician",
  488                  last_n ame: "Qtc" ) unless U ser.exists ?(email: " clinician@ qtc.com")
  489  
  490     sclinici an_QTC_use r = User.c reate(
  491                  email:  "super_cl inician@qt c.com",
  492                  passwo rd: "Sms!1 23456789",
  493                  author ization_st ate: "auth orized",
  494                  first_ name: "Sup er",
  495                  last_n ame: "Qtc" ) unless U ser.exists ?(email: " super_clin ician@qtc. com")
  496  
  497     qa_QTC_u ser = User .create(
  498                  email:  "qa@qtc.c om",
  499                  passwo rd: "Sms!1 23456789",
  500                  author ization_st ate: "auth orized",
  501                  first_ name: "Qa" ,
  502                  last_n ame: "Qtc" ) unless U ser.exists ?(email: " qa@qtc.com ")
  503  
  504     # CPP-sp ecific tes t users
  505  
  506     cheryl_h oward_npis  = %w(
  507       104330 3563
  508       108308 9809
  509       122518 2579
  510       122534 0383
  511       129512 4063
  512       129586 2415
  513       136649 9295
  514       159819 9259
  515       165969 6045
  516       171034 2811
  517     )
  518  
  519     vha_cc =  User.crea te(
  520                  email:  "vha_cc@e xample.com ",
  521                  passwo rd: "Sms!1 23456789",
  522                  first_ name: "VHA  CC",
  523                  last_n ame: "Test User",
  524                  author ization_st ate: 'auth orized',
  525                  roles:  ["vha_cc" ]) unless  User.exist s?(email:  "vha_cc@ex ample.com" )
  526  
  527     non_vha  = User.cre ate(
  528                  email:  "non_vha@ example.co m",
  529                  passwo rd: "Sms!1 23456789",
  530                  first_ name: "Non  VHA",
  531                  last_n ame: "Test User",
  532                  author ization_st ate: 'auth orized',
  533                  npi: c heryl_howa rd_npis.po p,
  534                  roles:  ["non_vha "]) unless  User.exis ts?(email:  "non_vha@ example.co m")
  535  
  536     vha_cc2  = User.cre ate(
  537                  email:  "vhacc.cp ptestuser@ gmail.com" ,
  538                  passwo rd: "Sms!1 23456789",
  539                  first_ name: "VHA  CC2",
  540                  last_n ame: "Test User",
  541                  author ization_st ate: 'auth orized',
  542                  roles:  ["app_adm in","vha_c c"]) unles s User.exi sts?(email : "vhacc.c pptestuser @gmail.com ")
  543  
  544     non_vha2  = User.cr eate(
  545                  email:  "nonvha.c pptestuser @gmail.com ",
  546                  passwo rd: "Sms!1 23456789",
  547                  first_ name: "Non  VHA2",
  548                  last_n ame: "Test User",
  549                  author ization_st ate: 'auth orized',
  550                  npi: c heryl_howa rd_npis.po p(2),
  551                  roles:  ["non_vha "]) unless  User.exis ts?(email:  "nonvha.c pptestuser @gmail.com ")
  552  
  553     vha_cc3  = User.cre ate(
  554                  email:  " PII                   ",
  555                  passwo rd: "Sms!1 23456789",
  556                  first_ name: "Amy ",
  557                  last_n ame: "Rose nthal",
  558                  author ization_st ate: 'auth orized',
  559                    roles: ["v ha_cc"]) u nless User .exists?(e mail: " PII                    ")
  560  
  561     non_vha3  = User.cr eate(
  562                  email:  "arosenth al@meetver acity.com" ,
  563                  passwo rd: "Sms!1 23456789",
  564                  first_ name: "Amy ",
  565                  last_n ame: "Rose nthal",
  566                  author ization_st ate: 'auth orized',
  567                  npi: c heryl_howa rd_npis.po p(2),
  568                  roles:  ["non_vha "]) unless  User.exis ts?(email:  "arosenth al@meetver acity.com" )
  569  
  570     non_vha4  = User.cr eate(
  571                  email:  "tmcmurdo @meetverac ity.com",
  572                  passwo rd: "Sms!1 23456789",
  573                  first_ name: "The resa",
  574                  last_n ame: "McMu rdo",
  575                  author ization_st ate: 'auth orized',
  576                  npi: c heryl_howa rd_npis.po p(2),
  577                  roles:  ["non_vha "]) unless  User.exis ts?(email:  "tmcmurdo @meetverac ity.com")
  578  
  579     non_vha5  = User.cr eate(
  580                  email:  "jrobinso n@meetvera city.com",
  581                  passwo rd: "Sms!1 23456789",
  582                  first_ name: "Jef f",
  583                  last_n ame: "Robi nson",
  584                  author ization_st ate: 'auth orized',
  585                  npi: c heryl_howa rd_npis.po p(2),
  586                  roles:  ["non_vha "]) unless  User.exis ts?(email:  "jrobinso n@meetvera city.com")
  587  
  588  
  589     # Adding  customer  test accou nts for CP P
  590     customer _test_acco unts = %w[
  591        PII                         
  592        PII                      
  593        PII                
  594     ].each d o |email|
  595       name =  email.spl it('@').fi rst.split( '.')
  596       User.c reate(
  597                  email:                  emai l,
  598                  passwo rd:              "Sms !123456789 ",
  599                  first_ name:            name .first,
  600                  last_n ame:             name .last,
  601                  author ization_st ate:  'aut horized',
  602                  roles:                  ["vh a_cc"]) un less User. exists?(em ail: email )
  603  
  604     end
  605  
  606  
  607     # add em pty UserPr eference o bject to e ach user,  with time  zone
  608     # corres ponding to  index
  609     US_TIME_ ZONES = Ac tiveSuppor t::TimeZon e.us_zones .map &:nam e
  610     User.all .each_with _index do  |user, ind ex|
  611       time_z one_string      = US_ TIME_ZONES [index % U S_TIME_ZON ES.count]
  612       user.u ser_prefer ence = Use rPreferenc e.new(time _zone: tim e_zone_str ing)
  613       if use r.is_vha_c c?
  614         user .user_pref erence.vis ta_duz        = 'mLb+ ZHYXCWt7R9 WvfFhWHBwd OKeT5ZsuZJ OmjLIU8ko= '
  615         user .user_pref erence.vis ta_user_na me = 'WASH ,PAUL E'
  616         user .user_pref erence.vis ta_site_id    = '516'
  617         user .user_pref erence.sav e(validati on: false)
  618       end
  619       user.s ave(valida tion: fals e)
  620     end
  621  
  622     ######## ########## ########## ########## ########## #########
  623     ## Updat ing test u ser's site  and roles
  624  
  625     puts ".. . Adding s ite and si te roles t o CUI-user s."
  626  
  627     app_admi n.present?  ? (app_ad min.add_si te(site3);  app_admin .get_site_ roles(site 3).update( admin: tru e, triage:  true, sch eduling: t rue, clini cian: true , super_cl inician: t rue, qa: t rue)) : fa lse
  628     app_admi n.present?  ? (app_ad min.add_si te(site6);  app_admin .get_site_ roles(site 6).update( admin: tru e, triage:  true, sch eduling: t rue, clini cian: true , super_cl inician: t rue, qa: t rue)) : fa lse
  629     site_use r1.present ? ? (site_ user1.add_ site(site3 ); site_us er1.get_si te_roles(s ite3).upda te(admin:  true, tria ge: true,  scheduling : true, cl inician: t rue, super _clinician : true, qa : true)) :  false
  630     site_use r2.present ? ? (site_ user2.add_ site(site3 ); site_us er2.get_si te_roles(s ite3).upda te(admin:  true, tria ge: true,  scheduling : true, cl inician: t rue, super _clinician : true, qa : true)) :  false
  631     all_role s_QTC_user .present?  ? (all_rol es_QTC_use r.add_site (site3); a ll_roles_Q TC_user.ge t_site_rol es(site3). update(adm in: true,  triage: tr ue, schedu ling: true , clinicia n: true, s uper_clini cian: true , qa: true )) : false
  632     admin_QT C_user.pre sent? ? (a dmin_QTC_u ser.add_si te(site3);  admin_QTC _user.get_ site_roles (site3).up date(admin : true)) :  false
  633     triage_Q TC_user.pr esent? ? ( triage_QTC _user.add_ site(site3 ); triage_ QTC_user.g et_site_ro les(site3) .update(tr iage: true )) : false
  634     scheduli ng_QTC_use r.present?  ? (schedu ling_QTC_u ser.add_si te(site3);  schedulin g_QTC_user .get_site_ roles(site 3).update( scheduling : true)) :  false
  635     clinicia n_QTC_user .present?  ? (clinici an_QTC_use r.add_site (site3); c linician_Q TC_user.ge t_site_rol es(site3). update(cli nician: tr ue)) : fal se
  636     sclinici an_QTC_use r.present?  ? (sclini cian_QTC_u ser.add_si te(site3);  sclinicia n_QTC_user .get_site_ roles(site 3).update( super_clin ician: tru e)) : fals e
  637     qa_QTC_u ser.presen t? ? (qa_Q TC_user.ad d_site(sit e3); qa_QT C_user.get _site_role s(site3).u pdate(qa:  true)) : f alse
  638  
  639  
  640     ######## ########## ########## ########## ########## #########
  641     ## Addin g the Eval uation spe cs
  642  
  643     puts ".. . Evaluati onSpec tab le."
  644  
  645     ######## ########## ########## ########## ########## #########
  646     ## Seed  the Evalua tion Specs
  647  
  648     seed_spe cs_log = F ile.open(L OG_DIR+'se ed_specs.l og','w')
  649  
  650     print ". .. Executi ng Evaluat ionSpec.sy nc_specs . .. "
  651     Evaluati onSpec.syn c_specs(ni l, "app/ex ams/*.yml" , seed_spe cs_log)
  652     puts "do ne"
  653  
  654     seed_spe cs_log.clo se
  655  
  656     ######## ########## ########## ########## ########## ##########
  657     ## Send  exam reque sts to CUI
  658  
  659     puts ".. . Seeding  exam reque sts in CUI "
  660  
  661     seed_fro m_sql( Cla im, ExamRe quest, Con tention, C ontentionD etail, Con tentionsDb qInformati on, Conten tionObject , RequestO bject, res et_only: t rue )
  662  
  663     puts "Do ne"
  664  
  665  
  666     ######## ########## ########## ########## ########## #########
  667     ## defin e test Vet eran, cons ultation,  referral
  668     ## TODO:  add test  data for t he sub-ref erral tabl es
  669  
  670     puts "\n ... Vetera n, Consult ation, Ref erral tabl es."
  671  
  672     RANDOMIZ ED_VETERAN _COUNT = 1 0
  673  
  674     # PP-496 : adding m ore test v eterans na med after  famous U.S . Generals  who died  in WWII
  675     US_GENER ALS = [
  676       {last_ name: 'And ersen', fi rst_name:  'James', m iddle_name : 'Roy', g ender: 'M' , date_of_ birth: '1/ 1/1904'},
  677       {last_ name: 'And erson', fi rst_name:  'Alexander ', middle_ name: 'Edw ard', gend er: 'M', d ate_of_bir th: '1/1/1 889'},
  678       {last_ name: 'And rews', fir st_name: ' Frank', mi ddle_name:  'Maxwell' , gender:  'M', date_ of_birth:  '1/1/1884' },
  679       {last_ name: 'Bar th Jr.', f irst_name:  'Charles' , middle_n ame: 'Henr y', gender : 'M', dat e_of_birth : '1/1/190 3'},
  680       {last_ name: 'Ber man', firs t_name: 'M orris', mi ddle_name:  '', gende r: 'M', da te_of_birt h: '1/1/18 91'},
  681       {last_ name: 'Bou dinot', fi rst_name:  'Truman',  middle_nam e: 'Everet t', gender : 'M', dat e_of_birth : '1/1/189 5'},
  682       {last_ name: 'Bra nn', first _name: 'Do nald', mid dle_name:  'Weldon',  gender: 'M ', date_of _birth: '1 /1/1895'},
  683       {last_ name: 'Bra un Jr.', f irst_name:  'Gustav',  middle_na me: 'Josep h', gender : 'M', dat e_of_birth : '1/1/189 5'},
  684       {last_ name: 'Buc kner Jr.',  first_nam e: 'Simon' , middle_n ame: 'Boli var', gend er: 'M', d ate_of_bir th: '1/1/1 886'},
  685       {last_ name: 'Car rington',  first_name : 'Gordon' , middle_n ame: 'de L auney', ge nder: 'M',  date_of_b irth: '1/1 /1894'},
  686       {last_ name: 'Cas tle', firs t_name: 'F rederick',  middle_na me: 'Walke r', gender : 'M', dat e_of_birth : '1/1/190 8'},
  687       {last_ name: 'Cha mberlin',  first_name : 'Harry',  middle_na me: 'Dwigh t', gender : 'M', dat e_of_birth : '1/1/188 7'},
  688       {last_ name: 'Cra ig', first _name: 'Ma lin', midd le_name: ' ', gender:  'M', date _of_birth:  '1/1/1875 '},
  689       {last_ name: 'Dal ton II', f irst_name:  'James',  middle_nam e: 'Leo',  gender: 'M ', date_of _birth: '1 /1/1910'},
  690       {last_ name: 'Dar by', first _name: 'Wi lliam', mi ddle_name:  'Orlando' , gender:  'M', date_ of_birth:  '1/1/1911' },
  691       {last_ name: 'Dar gue', firs t_name: 'H erbert', m iddle_name : 'Arthur' , gender:  'M', date_ of_birth:  '1/1/1886' },
  692       {last_ name: 'Dav is', first _name: 'Dw ight', mid dle_name:  'Filley',  gender: 'M ', date_of _birth: '1 /1/1879'},
  693       {last_ name: 'Dav ison', fir st_name: ' Donald', m iddle_name : 'Angus',  gender: ' M', date_o f_birth: ' 1/1/1892'} ,
  694       {last_ name: 'De  Jesus', fi rst_name:  'Simeon',  middle_nam e: '', gen der: 'M',  date_of_bi rth: '1/1/ 1894'},
  695       {last_ name: 'Dun can', firs t_name: 'A sa', middl e_name: 'N orth', gen der: 'M',  date_of_bi rth: '1/1/ 1892'},
  696       {last_ name: 'Eas ley', firs t_name: 'C laudius',  middle_nam e: 'Miller ', gender:  'M', date _of_birth:  '1/1/1891 '},
  697       {last_ name: 'Eat on', first _name: 'Wi lliam', mi ddle_name:  'Herbert' , gender:  'M', date_ of_birth:  '1/1/1906' },
  698       {last_ name: 'Eme ry', first _name: 'Am brose', mi ddle_name:  'Robert',  gender: ' M', date_o f_birth: ' 1/1/1883'} ,
  699       {last_ name: 'For rest', fir st_name: ' Nathan', m iddle_name : 'Bedford ', gender:  'M', date _of_birth:  '1/1/1905 '},
  700       {last_ name: 'For t', first_ name: 'Guy ', middle_ name: 'Osb orne', gen der: 'M',  date_of_bi rth: '1/1/ 1879'},
  701       {last_ name: 'Gar dner', fir st_name: ' John', mid dle_name:  'Henry', g ender: 'M' , date_of_ birth: '1/ 1/1893'},
  702       {last_ name: 'Gar lington',  first_name : 'Creswel l', middle _name: '',  gender: ' M', date_o f_birth: ' 1/1/1887'} ,
  703       {last_ name: 'Geo rge', firs t_name: 'H arold', mi ddle_name:  'Huston',  gender: ' M', date_o f_birth: ' 1/1/1892'} ,
  704       {last_ name: 'Gib bons', fir st_name: ' Lloyd', mi ddle_name:  'Henry',  gender: 'M ', date_of _birth: '1 /1/1895'},
  705       {last_ name: 'God frey', fir st_name: ' Stuart', m iddle_name : 'Chapin' , gender:  'M', date_ of_birth:  '1/1/1886' },
  706       {last_ name: 'Goo drich', fi rst_name:  'Donald',  middle_nam e: 'Reuben ', gender:  'M', date _of_birth:  '1/1/1894 '},
  707       {last_ name: 'Gra ves', firs t_name: 'D avis', mid dle_name:  'Dunbar',  gender: 'M ', date_of _birth: '1 /1/1903'},
  708       {last_ name: 'Har mon Jr.',  first_name : 'Millard ', middle_ name: 'Fil lmore', ge nder: 'M',  date_of_b irth: '1/1 /1888'},
  709       {last_ name: 'Har ms', first _name: 'He nry', midd le_name: ' William',  gender: 'M ', date_of _birth: '1 /1/1887'},
  710       {last_ name: 'Hol land', fir st_name: ' Thomas', m iddle_name : 'Leroy',  gender: ' M', date_o f_birth: ' 1/1/1879'} ,
  711       {last_ name: 'Hyd e', first_ name: 'Jam es', middl e_name: 'F rancis Cla rk', gende r: 'M', da te_of_birt h: '1/1/18 94'},
  712       {last_ name: 'Jac kson', fir st_name: ' Stonewall' , middle_n ame: '', g ender: 'M' , date_of_ birth: '1/ 1/1891'},
  713       {last_ name: 'Joh nson', fir st_name: ' Herbert',  middle_nam e: 'Thomas ', gender:  'M', date _of_birth:  '1/1/1872 '},
  714       {last_ name: 'Kee rans Jr.',  first_nam e: 'Charle s', middle _name: 'Le slie', gen der: 'M',  date_of_bi rth: '1/1/ 1899'},
  715       {last_ name: 'Lac kland', fi rst_name:  'Frank', m iddle_name : 'Dorwin' , gender:  'M', date_ of_birth:  '1/1/1884' },
  716       {last_ name: 'Lay man', firs t_name: 'W alter', mi ddle_name:  'Gilbert' , gender:  'M', date_ of_birth:  '1/1/1888' },
  717       {last_ name: 'Lim ', first_n ame: 'Vice nte', midd le_name: ' ', gender:  'M', date _of_birth:  '1/1/1889 '},
  718       {last_ name: 'Lou tzenheiser ', first_n ame: 'Joe' , middle_n ame: 'L.',  gender: ' M', date_o f_birth: ' 1/1/1899'} ,
  719       {last_ name: 'Lym an', first _name: 'Al bert', mid dle_name:  'Kuali Bri ckwood', g ender: 'M' , date_of_ birth: '1/ 1/1885'},
  720       {last_ name: 'Lyo n', first_ name: 'Alf red', midd le_name: ' Jefferson' , gender:  'M', date_ of_birth:  '1/1/1892' },
  721       {last_ name: 'Mah in', first _name: 'Fr ank', midd le_name: ' Cadle', ge nder: 'M',  date_of_b irth: '1/1 /1887'},
  722       {last_ name: 'May nard', fir st_name: ' John', mid dle_name:  'Blackwell ', gender:  'M', date _of_birth:  '1/1/1887 '},
  723       {last_ name: 'McB ride', fir st_name: ' Allan', mi ddle_name:  'Clay', g ender: 'M' , date_of_ birth: '1/ 1/1885'},
  724       {last_ name: 'McC ornack', f irst_name:  'Condon',  middle_na me: 'Carlt on', gende r: 'M', da te_of_birt h: '1/1/18 80'},
  725       {last_ name: 'McD aniel', fi rst_name:  'Arthur',  middle_nam e: 'Bee',  gender: 'M ', date_of _birth: '1 /1/1895'},
  726       {last_ name: 'McN air', firs t_name: 'L esley', mi ddle_name:  'James',  gender: 'M ', date_of _birth: '1 /1/1883'},
  727       {last_ name: 'Nai den', firs t_name: 'E arl', midd le_name: ' Larue', ge nder: 'M',  date_of_b irth: '1/1 /1894'},
  728       {last_ name: 'Net herwood',  first_name : 'Douglas ', middle_ name: 'Bla ckshaw', g ender: 'M' , date_of_ birth: '1/ 1/1885'},
  729       {last_ name: 'New garden', f irst_name:  'Paul', m iddle_name : 'Wooleve r', gender : 'M', dat e_of_birth : '1/1/189 2'},
  730       {last_ name: 'Old s', first_ name: 'Rob ert', midd le_name: ' ', gender:  'M', date _of_birth:  '1/1/1896 '},
  731       {last_ name: 'Pat ch', first _name: 'Al exander',  middle_nam e: 'McCarr ell', gend er: 'M', d ate_of_bir th: '1/1/1 889'},
  732       {last_ name: 'Pat rick', fir st_name: ' Edwin', mi ddle_name:  'Davies',  gender: ' M', date_o f_birth: ' 1/1/1894'} ,
  733       {last_ name: 'Pat ton Jr.',  first_name : 'George' , middle_n ame: 'Smit h', gender : 'M', dat e_of_birth : '1/1/188 5'},
  734       {last_ name: 'Pen ington', f irst_name:  'Carlos',  middle_na me: 'Alden ', gender:  'M', date _of_birth:  '1/1/1878 '},
  735       {last_ name: 'Pow ell', firs t_name: 'W illiam', m iddle_name : 'Dan', g ender: 'M' , date_of_ birth: '1/ 1/1893'},
  736       {last_ name: 'Pra tt', first _name: 'Do n', middle _name: 'Fo rrester',  gender: 'M ', date_of _birth: '1 /1/1892'},
  737       {last_ name: 'Ram ey', first _name: 'Ho ward', mid dle_name:  'Knox', ge nder: 'M',  date_of_b irth: '1/1 /1896'},
  738       {last_ name: 'Rod erick', fi rst_name:  'Thomas',  middle_nam e: 'Edison ', gender:  'M', date _of_birth:  '1/1/1892 '},
  739       {last_ name: 'Roo sevelt Jr. ', first_n ame: 'Theo dore', mid dle_name:  '', gender : 'M', dat e_of_birth : '1/1/188 7'},
  740       {last_ name: 'Ros e', first_ name: 'Mau rice', mid dle_name:  '', gender : 'M', dat e_of_birth : '1/1/189 9'},
  741       {last_ name: 'Rus sell', fir st_name: ' Clinton',  middle_nam e: 'Warden ', gender:  'M', date _of_birth:  '1/1/1891 '},
  742       {last_ name: 'San tos', firs t_name: 'P aulino', m iddle_name : 'Torres' , gender:  'M', date_ of_birth:  '1/1/1890' },
  743       {last_ name: 'Sea rby', firs t_name: 'E dmund', mi ddle_name:  'Wilson',  gender: ' M', date_o f_birth: ' 1/1/1896'} ,
  744       {last_ name: 'Seg undo Y Ven tura', fir st_name: ' Fidel', ge nder: 'M',  date_of_b irth: '1/1 /1894'},
  745       {last_ name: 'Tay lor', firs t_name: 'V ictor', mi ddle_name:  'Vaughan' , gender:  'M', date_ of_birth:  '1/1/1893' },
  746       {last_ name: 'Tay lor', firs t_name: 'W illis', mi ddle_name:  'Ratcliff e', gender : 'M', dat e_of_birth : '1/1/189 7'},
  747       {last_ name: 'Tin ker', firs t_name: 'C larence',  middle_nam e: 'Leonar d', gender : 'M', dat e_of_birth : '1/1/188 7'},
  748       {last_ name: 'Wal ker', firs t_name: 'K enneth', m iddle_name : 'Newton' , gender:  'M', date_ of_birth:  '1/1/1898' },
  749       {last_ name: 'Wal ker', firs t_name: 'N elson', mi ddle_name:  'Macy', g ender: 'M' , date_of_ birth: '1/ 1/1891'},
  750       {last_ name: 'Was h', first_ name: 'Car lyle', mid dle_name:  'Hilton',  gender: 'M ', date_of _birth: '1 /1/1889'},
  751       {last_ name: 'Wat son', firs t_name: 'E dwin', mid dle_name:  'Martin',  gender: 'M ', date_of _birth: '1 /1/1883'},
  752       {last_ name: 'Wea ver', firs t_name: 'W alter', mi ddle_name:  'Reed', g ender: 'M' , date_of_ birth: '1/ 1/1885'},
  753       {last_ name: 'Wee d', first_ name: 'Fra nk', middl e_name: 'W atkins', g ender: 'M' , date_of_ birth: '1/ 1/1881'},
  754       {last_ name: 'Wha rton', fir st_name: ' James', mi ddle_name:  'Edward',  gender: ' M', date_o f_birth: ' 1/1/1894'} ,
  755       {last_ name: 'Wil son', firs t_name: 'R ussell', m iddle_name : 'Alger',  gender: ' M', date_o f_birth: ' 1/1/1905'} ,
  756       {last_ name: 'Win g', first_ name: 'Leo nard', mid dle_name:  'Fish', ge nder: 'M',  date_of_b irth: '1/1 /1893'}
  757     ]
  758  
  759     TOTAL_VE TERAN_COUN T = (RANDO MIZED_VETE RAN_COUNT  + US_GENER ALS.count)
  760  
  761     RANDOMIZ ED_VETERAN _COUNT.tim es do |vet eran_numbe r|
  762  
  763       puts " Fake Veter an #{veter an_number+ 1} of #{RA NDOMIZED_V ETERAN_COU NT}."
  764  
  765       vetera n_record   = Seeder:: VeteranSee d.new(vete ran_number ).veteran
  766       vetera n_id       = veteran_ record.id
  767  
  768       5.time s do |cons ultation_n umber|
  769         cons ultation_r ecord = Se eder::Cons ultationSe ed.new(vet eran_recor d, consult ation_numb er).consul tation
  770         cons ultation_i d     = co nsultation _record.id
  771  
  772         20.t imes do |r eferral_nu mber|
  773           re ferral_see d_record   = Seeder:: ReferralSe ed.new(vet eran_id, c onsultatio n_id, refe rral_numbe r)
  774           re ferral_id             = referral _seed_reco rd.referra l.id
  775  
  776           2. times do | referral_n ote_number |
  777              Seeder::Re ferralNote Seed.new(v eteran_id,  consultat ion_id, re ferral_id,  referral_ note_numbe r)
  778           en d
  779  
  780           2. times do | referral_a ppointment _number|
  781              Seeder::Re ferralAppo intmentSee d.new(vete ran_id, co nsultation _id, refer ral_id, re ferral_app ointment_n umber)
  782           en d
  783  
  784           2. times do | referral_a pproval_nu mber|
  785              Seeder::Re ferralAppr ovalSeed.n ew(veteran _id, consu ltation_id , referral _id, refer ral_approv al_number)
  786           en d
  787  
  788           2. times do | referral_d ocument_nu mber|
  789              Seeder::Re ferralDocu mentSeed.n ew(veteran _id, consu ltation_id , referral _id, refer ral_docume nt_number)
  790           en d
  791  
  792         end  # 20.times  do |refer ral_number |
  793       end #  5.times do  |consulta tion_numbe r|
  794     end # RA NDOMIZED_V ETERAN_COU NT.times d o |veteran _number|
  795  
  796  
  797     print "A dding Worl d War II h eroes with  fake SSNs  ... "
  798     US_GENER ALS.each_w ith_index  do |us_gen eral_data,  usg_index |
  799       vet_nu mber = RAN DOMIZED_VE TERAN_COUN T + usg_in dex + 1
  800       Seeder ::VeteranS eed.new((v et_number) , us_gener al_data)
  801     end
  802  
  803     puts "Do ne."
  804  
  805   end # if R ails.env = = "develop ment"