Sort unrestricted drugs before restricted ones
This commit is contained in:
parent
07595d0ef9
commit
2398f75203
@ -161,7 +161,11 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
// Sort unrestricted, then restricted/streamlined, then authority required
|
||||||
|
|
||||||
|
const type1 = item1['restriction_flag'] === 'U' ? 0 : item1['restriction_flag'] === 'R' ? 1 : item1['restriction_flag'] === 'S' ? 1 : item1['streamlined_authorities'] > 0 ? 2 : 3;
|
||||||
|
const type2 = item2['restriction_flag'] === 'U' ? 0 : item2['restriction_flag'] === 'R' ? 1 : item2['restriction_flag'] === 'S' ? 1 : item2['streamlined_authorities'] > 0 ? 2 : 3;
|
||||||
|
return type1 - type2;
|
||||||
}
|
}
|
||||||
|
|
||||||
function execAsScalars(stmt) {
|
function execAsScalars(stmt) {
|
||||||
|
Loading…
Reference in New Issue
Block a user