Medical professionals know all about triage. When there’s a high demand for medical services — such as in a natural disaster or an outbreak of disease as we are unfortunately now facing — they must perform this risk assessment to determine who needs the most urgent and intensive care.

Bail should be the same way. When we determine whether people who are arrested are released or kept in jail, an analysis similar to triage is required.

Unfortunately, the need for sober assessment is being lost in a discussion dominated by those claiming that no one should remain in jail prior to their trial and those who benefit financially from the current system, in which ability to pay is too often the primary factor.

Like hospitalization, jail is the costliest option. Moreover, because pretrial defendants have yet to be convicted, former Chief Justice William Rehnquist aptly noted: “In our society, liberty is the norm, and detention prior to trial or without trial is the carefully limited exception.” However, just as there are individuals so sick that they will die if not kept in the hospital, there is a very small number of pretrial defendants who are so dangerous that there are no conditions under which they can be safely released.

However, in many states, constitutional provisions excessively limit the authority of judges to deny bail to this sliver of highly dangerous defendants. In Texas, bail can be denied to defendants charged with capital murder, but not those charged with ordinary murder or rape. As a result, the only option for courts is to set high bail amounts. And sometimes, wealthy but very dangerous defendants can come up with the entire amount — or more commonly 10 percent of it through a commercial bondsman.

At the other end of the spectrum, many more defendants charged with lesser offenses — and who are assessed as being a low risk to public safety — languish in jail because they cannot afford bail. Research shows that low-risk defendants held for just two to three days were 40 percent more likely to be re-arrested than those who were released after no more than 24 hours. Accordingly, the current system is both underinclusive and overinclusive.

Fortunately, there are solutions. The first step is untangling the decision of whether a defendant should remain in jail from the conditions of release. This includes administering an objective risk assessment upon admission that accounts for factors such as prior violent offenses and any previous instances of absconding. Notably, such factors, unlike socioeconomic status and prior drug possession cases, do not result in an undue racial impact. The actuarial assessment informs judicial decision-making, but no defendant is ever released or detained simply by virtue of an algorithm.

Upon reviewing the objective assessment and a hearing in which the defendant is represented by counsel, the court makes an appealable determination of whether the defendant should be released or denied bail. Under this approach, to deny bail, the judge must find — based on both the current charge and the assessment — that the defendant is so dangerous that there are no conditions under which they can be safely supervised in the community. There must also be clear and convincing evidence, not just probable cause, to believe the defendant is guilty. Given that on an annual basis about a third of those arrested are not convicted, this helps innocent people avoid the damage done by pretrial detention, which includes being separated from employment and family.

For those who are released, the assessment helps the court determine what conditions, if any, are necessary. Text-messaged court reminders are appropriate for all defendants because they do not burden liberty. In some cases, mitigating the defendant’s risk may also require reporting to a pretrial supervision officer and participating in treatment. If a financial condition such as cash bail or collateral is imposed, it must be attainable since the initial determination has been made that the defendant is suitable for release.

Policymakers should prescribe the type of bail reform that both enhances public safety and protects individual liberty. Just as in health care, pretrial decisions must be individualized and guided by objective evidence.

Presuming that no one should be in jail — or that jail populations should be reduced by an arbitrary percentage, without assessing the risk — makes no sense, any more than abandoning a triage system would make sense in a hospital setting.

By the same token, pretrial decisions based on ability to pay lock in inequality at the expense of properly balancing safety and liberty. Surely, injecting a dose of rationality into our pretrial justice system is not too much to ask.