Skip to main content
. Author manuscript; available in PMC: 2015 Dec 1.
Published in final edited form as: J Biomed Inform. 2014 Aug 10;52:386–393. doi: 10.1016/j.jbi.2014.08.001

Algorithm 1.

Finding the most proximal location

locList = new list
locList.add(0)
For modobj in modifiers {
  Switch(modobj) {
    case Subsegmental Pulmonary Artery: locList.add(1)
    case Segmental Pulmonary Artery: locList.add(2)
    case Lobar Pulmonary Artery: locList.add(3)
    case Subsegmental (regular modifier): locList.add(4)
    case Segmental (regular modifier): locList.add(5)
    case Main Pulmonary Artery: locList.add(6)
    case Main (regular modifier): locList.add(6)
    default: do nothing
  }
}
mostProximalLoc = max(locList)
Switch (mostProximalLoc){
  case 1,4: count as Subsegmental
  case 2,5: count as Segmental
  case 5: count as Lobar
  case 6: count as Central
  default: do nothing
}