Skip to content

Commit 6c918e8

Browse files
committed
getMostRecentArrivalSource in animal record
1 parent a648590 commit 6c918e8

2 files changed

Lines changed: 15 additions & 0 deletions

File tree

ehr/api-src/org/labkey/api/ehr/demographics/AnimalRecord.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,5 +98,7 @@ public interface AnimalRecord
9898

9999
Date getMostRecentArrival();
100100

101+
String getMostRecentArrivalSource();
102+
101103
Integer getDaysSinceWeight();
102104
}

ehr/src/org/labkey/ehr/demographics/AnimalRecordImpl.java

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,19 @@ public Date getMostRecentArrival()
306306
return null;
307307
}
308308

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");
317+
}
318+
319+
return null;
320+
}
321+
309322
@Override
310323
public Integer getDaysSinceWeight()
311324
{

0 commit comments

Comments
 (0)