Commit c83ede7 1 parent 36214e3 commit c83ede7 Copy full SHA for c83ede7
File tree 2 files changed +14
-3
lines changed
2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -1230,6 +1230,11 @@ class HIVTxNetwork {
1230
1230
( nr ) => this . entity_id_from_string ( nr . name )
1231
1231
) ;
1232
1232
1233
+ const entity_to_g_records = _ . groupBy (
1234
+ _ . filter ( g . node_objects , ( nr ) => ! exclude_nodes . has ( nr . id ) ) ,
1235
+ ( nr ) => this . entity_id_from_string ( nr . id )
1236
+ ) ;
1237
+
1233
1238
return _ . map (
1234
1239
_ . filter ( entities , ( gn ) => {
1235
1240
return (
@@ -1248,8 +1253,10 @@ class HIVTxNetwork {
1248
1253
person_ident_dt : timeDateUtil . hivtrace_date_or_na_if_missing (
1249
1254
entity_to_pg_records [ eid ] [ 0 ] . added
1250
1255
) ,
1251
- sample_dt : timeDateUtil . hivtrace_date_or_na_if_missing (
1252
- this . attribute_node_value_by_id ( gn , "sample_dt" )
1256
+ sample_dt : d3 . min ( entity_to_g_records [ eid ] , ( g ) =>
1257
+ timeDateUtil . hivtrace_date_or_na_if_missing (
1258
+ this . attribute_node_value_by_id ( g , "sample_dt" )
1259
+ )
1253
1260
) ,
1254
1261
new_linked_case : this . priority_groups_is_new_node (
1255
1262
entity_to_pg_records [ eid ] [ 0 ]
Original file line number Diff line number Diff line change @@ -66,7 +66,11 @@ function getAncientDate() {
66
66
function hivtrace_date_or_na_if_missing ( date , formatter ) {
67
67
if ( date ) {
68
68
formatter = formatter || DateViewFormatExport ;
69
- return formatter ( date ) ;
69
+ try {
70
+ return formatter ( date ) ;
71
+ } catch {
72
+ console . log ( date ) ;
73
+ }
70
74
}
71
75
return "N/A" ;
72
76
}
You can’t perform that action at this time.
0 commit comments