File tree Expand file tree Collapse file tree 3 files changed +17
-2
lines changed
api-src/org/labkey/api/ehr/demographics
src/org/labkey/ehr/demographics Expand file tree Collapse file tree 3 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -98,5 +98,7 @@ public interface AnimalRecord
9898
9999 Date getMostRecentArrival ();
100100
101+ String getMostRecentArrivalSource ();
102+
101103 Integer getDaysSinceWeight ();
102104}
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ public SourceDemographicsProvider(Module module)
3939 protected Collection <FieldKey > getFieldKeys ()
4040 {
4141 Set <FieldKey > keys = new HashSet <>();
42- keys .add (FieldKey .fromString ("date " ));
42+ keys .add (FieldKey .fromString ("mostRecentArrival " ));
4343 keys .add (FieldKey .fromString ("fromCenter" ));
4444 keys .add (FieldKey .fromString ("source" ));
4545 keys .add (FieldKey .fromString ("type" ));
Original file line number Diff line number Diff line change @@ -300,7 +300,20 @@ public Date getMostRecentArrival()
300300 {
301301 List <Map <String , Object >> rows = (List )_props .get ("source" );
302302 if (!rows .isEmpty ())
303- return (Date )rows .get (0 ).get ("date" );
303+ return (Date )rows .get (0 ).get ("mostRecentArrival" );
304+ }
305+
306+ return null ;
307+ }
308+
309+ @ Override
310+ public String getMostRecentArrivalSource ()
311+ {
312+ if (_props .containsKey ("source" ))
313+ {
314+ List <Map <String , Object >> rows = (List )_props .get ("source" );
315+ if (!rows .isEmpty ())
316+ return (String )rows .get (0 ).get ("source/meaning" );
304317 }
305318
306319 return null ;
You can’t perform that action at this time.
0 commit comments