@@ -421,7 +421,7 @@ Ext4.define('MCC.panel.MccImportPanel', {
421421
422422 Ext4 . Msg . wait ( 'Loading...' ) ;
423423 var fieldMap = {
424- 'Id/mccAlias/externalId ' : 'MCC_ID' ,
424+ 'Id/mccAlias/externalAlias ' : 'MCC_ID' ,
425425 'Id' : 'Center Id' ,
426426 'alternateIds' : 'Previous IDs' ,
427427 'colony' : 'Colony' ,
@@ -453,7 +453,10 @@ Ext4.define('MCC.panel.MccImportPanel', {
453453 columns : Object . keys ( fieldMap ) . join ( ',' ) ,
454454 scope : this ,
455455 failure : LDK . Utils . getErrorCallback ( ) ,
456- filterArray : [ LABKEY . Filter . create ( 'colony' , colonyName ) ] ,
456+ filterArray : [
457+ LABKEY . Filter . create ( 'colony' , colonyName ) ,
458+ LABKEY . Filter . create ( 'calculated_status' , 'Alive' )
459+ ] ,
457460 success : function ( results ) {
458461 Ext4 . Msg . hide ( ) ;
459462
@@ -561,7 +564,7 @@ Ext4.define('MCC.panel.MccImportPanel', {
561564 LABKEY . Query . selectRows ( {
562565 schemaName : 'study' ,
563566 queryName : 'demographics' ,
564- columns : 'Id,alternateIds,dam,sire,birth,death,colony,objectid,lsid,Id/mccAlias/externalId ,Id/death/date,Id/MostRecentDeparture/MostRecentDeparture' ,
567+ columns : 'Id,alternateIds,dam,sire,birth,death,colony,objectid,lsid,Id/mccAlias/externalAlias ,Id/death/date,Id/MostRecentDeparture/MostRecentDeparture' ,
565568 scope : this ,
566569 failure : LDK . Utils . getErrorCallback ( ) ,
567570 success : function ( results ) {
@@ -604,7 +607,7 @@ Ext4.define('MCC.panel.MccImportPanel', {
604607 row . existingRecord = row . Id && demographicsRecords . allIds . indexOf ( row . Id . toLowerCase ( ) ) > - 1 ;
605608 if ( row . existingRecord ) {
606609 var existingRecord = demographicsRecords . rowMap [ row . Id . toLowerCase ( ) ] ;
607- existingRecord . mccAlias = existingRecord [ 'Id/mccAlias/externalId ' ]
610+ existingRecord . mccAlias = existingRecord [ 'Id/mccAlias/externalAlias ' ]
608611
609612 if ( existingRecord . colony !== row . colony ) {
610613 row . errors . push ( 'Colony does not match existing row: ' + existingRecord . colony ) ;
0 commit comments