86. EPMO Open Source Coordination Office Redaction File Detail Report

Produced by Araxis Merge on 10/4/2017 8:04:35 AM 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.

86.1 Files compared

# Location File Last Modified
1 rdk.zip\rdk\product\production\rdk\src\subsystems\clinical-objects clinical-objects-validator-order-spec.js Mon Aug 21 12:51:00 2017 UTC
2 rdk.zip\rdk\product\production\rdk\src\subsystems\clinical-objects clinical-objects-validator-order-spec.js Tue Oct 3 18:31:07 2017 UTC

86.2 Comparison summary

Description Between
Files 1 and 2
Text Blocks Lines
Unchanged 6 212
Changed 5 12
Inserted 0 0
Removed 0 0

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

86.4 Active regular expressions

No regular expressions were active.

86.5 Comparison detail

  1   'use stric t';
  2  
  3   var clinic alObjects  = require( './clinica l-objects- subsystem' );
  4   var logger  = sinon.s tub(requir e('bunyan' ).createLo gger({name : 'clinica l-objects- subsystem' }));
  5   var nock =  require(' nock');
  6  
  7   var buildO rderObject  = functio n(ehmpStat e, referen ceId, doma in, subDom ain){
  8       return  {
  9             pid: ' R E D A CTED ;3',
  10           mo del: {
  11                  patientUid : 'urn:va: patient: R E D A CTED :3:3',
  12                  authorUid:  ' PL      ',
  13                domain:  domain,
  14                subDomai n: subDoma in,
  15                ehmpStat e: ehmpSta te,
  16                visit: {
  17                    loca tion: 'loc ation',
  18                    serv iceCategor y: 'servic eCategory' ,
  19                    date Time: 'dat eTime'
  20                },
  21                referenc eId: refer enceId,
  22                data: {
  23                    labT estText: ' Lab Text',
  24                    curr entItemCou nt: 1,
  25                    item s: [{
  26                         field1: 'f ield2'
  27                    }],
  28                    tota lItems: 1,
  29                    upda ted: '2016 01010111'
  30                },
  31           }
  32       };
  33   };
  34  
  35   var vxSync Endpoint =  'clinical Object';
  36   var testVx syncEndpoi nt = 'http :// IP             ';
  37  
  38   var appCon fig = {
  39       genera lPurposeJd sServer: {
  40             baseUrl: ' http:// IP                '
  41       },
  42       vxSync Server: {
  43             baseUrl: ' http:// IP             '
  44       }
  45   };
  46  
  47   describe(' Clinical o bject orde r validati on tests',  function( ) {
  48  
  49  
  50       descri be('creati ng a clini cal object ', functio n(done){
  51  
  52  
  53           it ('should c reate a cl inical obj ect when c alled with  the corre ct paramet ers', func tion(done)  {
  54  
  55                nock(tes tVxsyncEnd point).pos t('/' + vx SyncEndpoi nt).reply( 201, {});
  56                var orde rModel = b uildOrderO bject('act ive', 'tes tReference ID', 'ehmp -order', ' laboratory ');
  57                clinical Objects.cr eate(logge r, appConf ig, orderM odel.model , function (err, resp onse) {
  58                    expe ct(respons e).to.be.a n.object() ;
  59                    expe ct(err).to .be.null() ;
  60                    done ();
  61                });
  62           }) ;
  63  
  64           it ('should c reate an e rror when  an order h as the wro ng subDoma in', funct ion(done)  {
  65  
  66                nock(tes tVxsyncEnd point).pos t('/' + vx SyncEndpoi nt).reply( 201, {});
  67                var orde rModel = b uildOrderO bject('act ive', 'tes tReference ID', 'ehmp -order', ' something' );
  68                clinical Objects.cr eate(logge r, appConf ig, orderM odel.model , function (err, resp onse) {
  69                    expe ct(respons e).to.be.a n.undefine d();
  70                    expe ct(err).no t.to.be.nu ll();
  71                    expe ct(err.pop ()).to.be( 'Invalid S ubDomain') ;
  72                    done ();
  73                });
  74           }) ;
  75  
  76           it ('should c reate a cl inical obj ect when c alled with  the corre ct paramet ers', func tion(done)  {
  77  
  78                nock(tes tVxsyncEnd point).pos t('/' + vx SyncEndpoi nt).reply( 201, {});
  79                var orde rModel = b uildOrderO bject('act ive', 'tes tReference ID', 'ehmp -order', ' consult');
  80                clinical Objects.cr eate(logge r, appConf ig, orderM odel.model , function (err, resp onse) {
  81                    expe ct(respons e).to.be.a n.object() ;
  82                    expe ct(err).to .be.null() ;
  83                    done ();
  84                });
  85           }) ;
  86  
  87           it ('should c reate an e rror when  active ord er does no t have a r eference i d', functi on(done) {
  88  
  89                nock(tes tVxsyncEnd point).pos t('/' + vx SyncEndpoi nt).reply( 201, {});
  90                var orde rModel = b uildOrderO bject('act ive', '',  'ehmp-orde r', 'consu lt');
  91                clinical Objects.cr eate(logge r, appConf ig, orderM odel.model , function (err, resp onse) {
  92                    expe ct(respons e).to.be.a n.undefine d();
  93                    expe ct(err).no t.to.be.nu ll();
  94                    expe ct(err.pop ()).to.be( 'Active Or der should  have a re ferenceId' );
  95                    done ();
  96                });
  97           }) ;
  98  
  99           it ('should c reate an e rror when  draft orde r has a re ference id ', functio n(done) {
  100  
  101                nock(tes tVxsyncEnd point).pos t('/' + vx SyncEndpoi nt).reply( 201, {});
  102                var orde rModel = b uildOrderO bject('dra ft', '1234 ', 'ehmp-o rder', 'co nsult');
  103                clinical Objects.cr eate(logge r, appConf ig, orderM odel.model , function (err, resp onse) {
  104                    expe ct(respons e).to.be.a n.undefine d();
  105                    expe ct(err).no t.to.be.nu ll();
  106                    expe ct(err.pop ()).to.be( 'Draft Ord er should  not have a  reference Id');
  107                    done ();
  108                });
  109           }) ;
  110  
  111       });
  112   });