Simplify lab trial dispatch and fix per-jaw pricing
This commit is contained in:
@@ -38,7 +38,6 @@ class PricingService {
|
||||
int billableUnitsForTeeth(ProstheticType type, Iterable<int> teeth) {
|
||||
final selected = teeth.toSet();
|
||||
if (selected.isEmpty) return billableUnitsForType(type, 0);
|
||||
if (type.family == ProstheticFamily.hareketli) return 1;
|
||||
|
||||
final upper = {
|
||||
for (int i = 11; i <= 18; i++) i,
|
||||
@@ -49,6 +48,11 @@ class PricingService {
|
||||
for (int i = 41; i <= 48; i++) i,
|
||||
};
|
||||
|
||||
if (type.family == ProstheticFamily.hareketli) {
|
||||
return (selected.any(upper.contains) ? 1 : 0) +
|
||||
(selected.any(lower.contains) ? 1 : 0);
|
||||
}
|
||||
|
||||
var units = 0;
|
||||
final remaining = Set<int>.from(selected);
|
||||
if (upper.every(selected.contains)) {
|
||||
@@ -67,7 +71,7 @@ class PricingService {
|
||||
ProstheticType.hareketli ||
|
||||
ProstheticType.tamProtez ||
|
||||
ProstheticType.parsiyel =>
|
||||
'vaka',
|
||||
'çene',
|
||||
_ => 'diş',
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user