From 094b96ca0c1dcef19f8c1e7a977c7a024fa77eab Mon Sep 17 00:00:00 2001
From: buccimtpc <35525053+buccimtpc@users.noreply.github.com>
Date: Tue, 3 Dec 2019 16:04:30 +0200
Subject: [PATCH] Update aivo_get_subjects.m

Few fixes, For mistake I have already updated the aivo_get_subjects in shared/magia/aivo.
But the bug fix was clear, no doubt about the improvement, so I left it changed.
---
 aivo/aivo_get_subjects.m | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/aivo/aivo_get_subjects.m b/aivo/aivo_get_subjects.m
index 6ad90cb..4f3bee9 100644
--- a/aivo/aivo_get_subjects.m
+++ b/aivo/aivo_get_subjects.m
@@ -53,7 +53,7 @@ if((~mod(nargin,2)))
         value = varargin{i+l+1};
         l=l+1;
         % Materia view - Values
-        if(ismember(field,{'study_date','mri_code','dose','scan_start_time','injection_time','height','weight','age'}))
+        if(ismember(field,{'study_date','dose','scan_start_time','injection_time','height','weight','age'}))
             if(ischar(value)) %only one value
                 if(ismember('~',value))  %exclude spesific value
                     where_statement = [where_statement,' NOT ','materia.',lower(field),' = ',char(39),value(2:length(value)),char(39)];
@@ -84,7 +84,7 @@ if((~mod(nargin,2)))
                         where_statement = [where_statement,' AND '];
                     end
                  else % excluding the exact value/s
-                    where_statement = [where_statement,' NOT ','materia.',lower(field),' = ',char(39),value(2:length(value)),char(39)];
+                    where_statement = [where_statement,' NOT ',' materia.',lower(field),' = ',char(39),value(2:length(value)),char(39)];
                     if(i~=nargin/2)
                         where_statement = [where_statement,' AND '];
                     end  
@@ -145,4 +145,4 @@ refresh_cmd = 'REFRESH MATERIALIZED VIEW aivo2.materia';
 curs = exec(conn,refresh_cmd);
 close(curs);
 
-end
\ No newline at end of file
+end
-- 
GitLab