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 |
| } |