@@ -1013,7 +1013,6 @@ def encumber_privilege(self, adverse_action: AdverseActionData) -> None:
1013
1013
logger .info (message )
1014
1014
raise CCNotFoundException (f'Privilege not found for jurisdiction { adverse_action .jurisdiction } ' ) from e
1015
1015
1016
- # Find the main privilege record (not history records)
1017
1016
privilege_data = PrivilegeData .from_database_record (privilege_record )
1018
1017
1019
1018
need_to_set_privilege_to_inactive = True
@@ -1078,21 +1077,21 @@ def encumber_privilege(self, adverse_action: AdverseActionData) -> None:
1078
1077
1079
1078
def encumber_license (self , adverse_action : AdverseActionData ) -> None :
1080
1079
"""
1081
- Adds an adverse action record for a privilege for a provider in a jurisdiction.
1080
+ Adds an adverse action record for a license for a provider in a jurisdiction.
1082
1081
1083
1082
This will update the license record to have a compactEligibility of 'ineligible', and add a license update
1084
1083
record to show the encumbrance event.
1085
1084
1086
1085
:param AdverseActionData adverse_action: The details of the adverse action to be added to the records
1087
- :raises CCNotFoundException: If the privilege record is not found
1086
+ :raises CCNotFoundException: If the license record is not found
1088
1087
"""
1089
1088
with logger .append_context_keys (
1090
1089
compact = adverse_action .compact ,
1091
1090
provider_id = adverse_action .provider_id ,
1092
1091
jurisdiction = adverse_action .jurisdiction ,
1093
1092
license_type_abbreviation = adverse_action .license_type_abbreviation ,
1094
1093
):
1095
- # Get the privilege record
1094
+ # Get the license record
1096
1095
try :
1097
1096
license_record = self .config .provider_table .get_item (
1098
1097
Key = {
@@ -1104,13 +1103,12 @@ def encumber_license(self, adverse_action: AdverseActionData) -> None:
1104
1103
except KeyError as e :
1105
1104
message = 'License not found for jurisdiction'
1106
1105
logger .info (message )
1107
- raise CCNotFoundException (f'License not found for jurisdiction { adverse_action .jurisdiction } ' ) from e
1106
+ raise CCNotFoundException (f'{ message } { adverse_action .jurisdiction } ' ) from e
1108
1107
1109
- # Find the main privilege record (not history records)
1110
1108
license_data = LicenseData .from_database_record (license_record )
1111
1109
1112
1110
need_to_set_license_to_ineligible = True
1113
- # If already inactive , do nothing
1111
+ # If already ineligible , do nothing
1114
1112
if license_data .compact_eligibility == CompactEligibilityStatus .INELIGIBLE :
1115
1113
logger .info ('License already ineligible. Not updating license compact eligibility status' )
1116
1114
need_to_set_license_to_ineligible = False
@@ -1142,8 +1140,8 @@ def encumber_license(self, adverse_action: AdverseActionData) -> None:
1142
1140
)
1143
1141
# Update the privilege record and create history record
1144
1142
logger .info ('Encumbering license' )
1145
- # we add the adverse action record for the privilege ,
1146
- # the privilege update record, and update the privilege record to inactive if it is not already inactive
1143
+ # we add the adverse action record for the license ,
1144
+ # the license update record, and update the license record to ineligible if it is not already ineligible
1147
1145
transact_items = [
1148
1146
# Create a history record, reflecting this change
1149
1147
self ._generate_put_item_transaction (license_update_record ),
0 commit comments