@@ -27,10 +27,18 @@ class FileDetails:
2727 vaccine type.
2828 """
2929
30- def __init__ (self , supplier : str , vaccine_type : str , ods_code : str , file_number : int = 1 ):
31- self .vaccine_type = vaccine_type .upper ()
32- self .ods_code = ods_code .upper ()
33- self .supplier = supplier .upper ()
30+ def __init__ (
31+ self ,
32+ supplier : str = "RAVS" ,
33+ vaccine_type : str = None ,
34+ ods_code : str = None ,
35+ file_number : int = 1 ,
36+ organization_code : str = None ,
37+ ):
38+ self .vaccine_type = vaccine_type .upper () if vaccine_type else None
39+ self .ods_code = ods_code .upper () if ods_code else "X8E5B"
40+ self .organization_code = organization_code
41+ self .supplier = supplier .upper () if supplier else None
3442 self .queue_name = f"{ self .supplier } _{ self .vaccine_type } "
3543
3644 self .created_at_formatted_string = f"200{ file_number } 0101T00000000"
@@ -39,7 +47,14 @@ def __init__(self, supplier: str, vaccine_type: str, ods_code: str, file_number:
3947 self .name = f"{ self .vaccine_type } / { self .supplier } file"
4048
4149 file_date_and_time_string = f"20000101T0000000{ file_number } "
42- self .file_key = f"{ vaccine_type } _Vaccinations_v5_{ ods_code } _{ file_date_and_time_string } .csv"
50+ extended_attributes_prefix = "Vaccination_Extended_Attributes"
51+ if self .vaccine_type .startswith (extended_attributes_prefix ):
52+ file_key = f"{ extended_attributes_prefix } _v1_5_{ organization_code } _{ file_date_and_time_string } .csv"
53+ else :
54+ file_key = f"{ vaccine_type } _Vaccinations_v5_{ ods_code } _{ file_date_and_time_string } .csv"
55+
56+ self .file_key = file_key
57+
4358 self .ack_file_key = f"ack/{ self .file_key [:- 4 ]} _InfAck_{ self .created_at_formatted_string } .csv"
4459
4560 self .permissions_list = [f"{ self .vaccine_type } _FULL" ]
@@ -78,6 +93,9 @@ class MockFileDetails:
7893 emis_flu = FileDetails ("EMIS" , "FLU" , "YGM41" )
7994 emis_rsv = FileDetails ("EMIS" , "RSV" , "YGM41" )
8095 ravs_flu = FileDetails ("RAVS" , "FLU" , "X8E5B" )
96+ extended_attributes_file = FileDetails (
97+ vaccine_type = "Vaccination_Extended_Attributes" , file_number = 1 , organization_code = "RJ123"
98+ )
8199
82100
83101MOCK_FILE_HEADERS = (
0 commit comments