function BuildProvidersList (parent) {
	var arr = []; 
	if (parent.npi1 == null) return arr;
	return dbconnector.SearchProvider({npi:parent.npi1})
	.then(function(result){
		if (result == undefined) return arr;
		if(result !== arr) arr.push(Object.assign({}, result));
		if (parent.npi2 == null) return arr;
		return dbconnector.SearchProvider({npi:parent.npi2});
	}).then(function(result){
		if (result == undefined) return arr;
		if(result !== arr) arr.push(Object.assign({}, result));
		if (parent.npi3 == null) return arr;
		return dbconnector.SearchProvider({npi:parent.npi3});
	}).then(function(result){
		if (result == undefined) return arr;
		if(result !== arr) arr.push(Object.assign({}, result));
		return arr;
	});
}
// helper function to get the providers of a transaction
helper function to get the providers of a transaction
helper function to get the providers of a transaction
function BuildProvidersList (parent) {
	var arr = []; 
	if (parent.npi1 == null) return arr;
	return dbconnector.SearchProvider({npi:parent.npi1})
	.then(function(result){
		if (result == undefined) return arr;
		if(result !== arr) arr.push(Object.assign({}, result));
		if (parent.npi2 == null) return arr;
		return dbconnector.SearchProvider({npi:parent.npi2});
	}).then(function(result){
		if (result == undefined) return arr;
		if(result !== arr) arr.push(Object.assign({}, result));
		if (parent.npi3 == null) return arr;
		return dbconnector.SearchProvider({npi:parent.npi3});
	}).then(function(result){
		if (result == undefined) return arr;
		if(result !== arr) arr.push(Object.assign({}, result));
		return arr;
	});
}
function BuildProvidersList ( parent ) { var arr = [ ] ; if ( parent . npi1 == null ) return arr ; return dbconnector . SearchProvider ( { npi : parent . npi1 } ) . then ( function ( result ) { if ( result == undefined ) return arr ; if ( result !== arr ) arr . push ( Object . assign ( { } , result ) ) ; if ( parent . npi2 == null ) return arr ; return dbconnector . SearchProvider ( { npi : parent . npi2 } ) ; } ) . then ( function ( result ) { if ( result == undefined ) return arr ; if ( result !== arr ) arr . push ( Object . assign ( { } , result ) ) ; if ( parent . npi3 == null ) return arr ; return dbconnector . SearchProvider ( { npi : parent . npi3 } ) ; } ) . then ( function ( result ) { if ( result == undefined ) return arr ; if ( result !== arr ) arr . push ( Object . assign ( { } , result ) ) ; return arr ; } ) ; }
helper function to get the providers of a transaction
helper function to get the providers of a transaction