@@ -146,7 +146,7 @@ def validate(self, data: Dict[str, Any] | DocumentReference):
146146 self ._validate_content (resource )
147147 self ._validate_content_format (resource )
148148 self ._validate_content_extension (resource )
149- self ._validate_practiceSetting (resource )
149+ self ._validate_practice_setting (resource )
150150
151151 except StopValidationError :
152152 logger .log (LogReference .VALIDATOR003 )
@@ -287,19 +287,16 @@ def _validate_asid(self, asid_references: list):
287287 diagnostics = f"Invalid ASID value '{ asid_value } '. A single ASID consisting of 12 digits can be provided in the context.related field." ,
288288 field = f"context.related[{ idx } ].identifier.value" ,
289289 )
290- return
291290
292291 def _validate_ssp_asid (self , model : DocumentReference ):
293292 """
294293 Validate that the document contains a valid ASID in the context.related field when the content contains an SSP URL
295294 """
296295
297296 ssp_content = any (
298- [
299- content
300- for content in model .content
301- if content .attachment .url .startswith ("ssp://" )
302- ]
297+ content
298+ for content in model .content
299+ if content .attachment .url .startswith ("ssp://" )
303300 )
304301
305302 logger .log (LogReference .VALIDATOR001 , step = "ssp_content_and_asid_exists" )
@@ -338,7 +335,6 @@ def _validate_ssp_asid(self, model: DocumentReference):
338335 diagnostics = "Missing ASID identifier. context.related must contain a single valid ASID identifier when content contains an SSP URL" ,
339336 field = "context.related" ,
340337 )
341- return
342338
343339 def _validate_type (self , model : DocumentReference ):
344340 """
@@ -652,9 +648,8 @@ def _validate_author(self, model: DocumentReference):
652648 diagnostics = f"Invalid author value: '{ identifier .value } ' Author value must be less than 13 characters" ,
653649 field = "author[0].identifier.value" ,
654650 )
655- return
656651
657- def _validate_practiceSetting (self , model : DocumentReference ):
652+ def _validate_practice_setting (self , model : DocumentReference ):
658653 """
659654 Validate the practice setting field contains an appropriate coding system and code.
660655 """
@@ -716,7 +711,6 @@ def _validate_practiceSetting(self, model: DocumentReference):
716711 diagnostics = f"Invalid practice setting coding: display { practice_setting_display } does not match the expected display for { practice_setting_value } Practice Setting coding is bound to value set { PRACTICE_SETTING_VALUE_SET_URL } " ,
717712 field = "context.practiceSetting.coding[0]" ,
718713 )
719- return
720714
721715 def _validate_content (self , model : DocumentReference ):
722716 """
0 commit comments