@@ -1844,6 +1844,76 @@ func TestCreateQueueJobs_Fail_ACOConfigMismatch(t *testing.T) {
18441844 assert .ErrorContains (t , err , "failed to load or match ACO config (or potentially no ACO Configs set), CMS ID:" )
18451845}
18461846
1847+ func TestCreateQueueJobs_V3_SSP_GetsPartiallyAdjudicated (t * testing.T ) {
1848+ // SSP with only adjudicated in config gets both adjudicated and partially-adjudicated jobs when using v3.
1849+ sspACO := ACOConfig {
1850+ Model : "SSP" ,
1851+ patternExp : regexp .MustCompile (`^A\d{4}` ),
1852+ Data : []string {constants .Adjudicated },
1853+ }
1854+ cfg := & Config {
1855+ CutoffDuration : - 50 * time .Hour ,
1856+ SuppressionLookbackDays : int (30 ),
1857+ RunoutConfig : RunoutConfig {CutoffDuration : defaultRunoutCutoff , claimThru : defaultRunoutClaimThru },
1858+ ACOConfigs : []ACOConfig {sspACO },
1859+ V3NoPartialClaimsModels : []string {"CKCC" },
1860+ }
1861+ repository := models .NewMockRepository (t )
1862+ svc := NewService (repository , cfg , "" ).(* service )
1863+ ctx := context .WithValue (context .Background (), middleware .CtxTransactionKey , "test-txn" )
1864+ args := worker_types.PrepareJobArgs {
1865+ Job : models.Job {ID : 1 , TransactionTime : time .Now ()},
1866+ CMSID : "A1234" ,
1867+ ACOID : uuid .NewUUID (),
1868+ BFDPath : constants .BFDV3Path ,
1869+ ResourceTypes : []string {"ExplanationOfBenefit" , "Claim" },
1870+ CreationTime : time .Now (),
1871+ }
1872+ benes := []* models.CCLFBeneficiary {getCCLFBeneficiary (1 , "MBI1" )}
1873+ jobs , err := svc .createQueueJobs (ctx , args , time.Time {}, benes )
1874+ assert .NoError (t , err )
1875+ // EOB supports only adjudicated; Claim supports only partially-adjudicated. So we get 2 jobs (one of each data type).
1876+ assert .Len (t , jobs , 2 )
1877+ dataTypes := make ([]string , len (jobs ))
1878+ for i , j := range jobs {
1879+ dataTypes [i ] = j .DataType
1880+ }
1881+ assert .Contains (t , dataTypes , constants .Adjudicated )
1882+ assert .Contains (t , dataTypes , constants .PartiallyAdjudicated )
1883+ }
1884+
1885+ func TestCreateQueueJobs_V3_KCC_AdjudicatedOnly (t * testing.T ) {
1886+ // KCC (CKCC) with only adjudicated in config gets only adjudicated jobs in v3 (no PAC).
1887+ kccACO := ACOConfig {
1888+ Model : "CKCC" ,
1889+ patternExp : regexp .MustCompile (`C\d{4}` ),
1890+ Data : []string {constants .Adjudicated },
1891+ }
1892+ cfg := & Config {
1893+ CutoffDuration : - 50 * time .Hour ,
1894+ SuppressionLookbackDays : int (30 ),
1895+ RunoutConfig : RunoutConfig {CutoffDuration : defaultRunoutCutoff , claimThru : defaultRunoutClaimThru },
1896+ ACOConfigs : []ACOConfig {kccACO },
1897+ V3NoPartialClaimsModels : []string {"CKCC" },
1898+ }
1899+ repository := models .NewMockRepository (t )
1900+ svc := NewService (repository , cfg , "" ).(* service )
1901+ ctx := context .WithValue (context .Background (), middleware .CtxTransactionKey , "test-txn" )
1902+ args := worker_types.PrepareJobArgs {
1903+ Job : models.Job {ID : 1 , TransactionTime : time .Now ()},
1904+ CMSID : "C5678" ,
1905+ ACOID : uuid .NewUUID (),
1906+ BFDPath : constants .BFDV3Path ,
1907+ ResourceTypes : []string {"ExplanationOfBenefit" },
1908+ CreationTime : time .Now (),
1909+ }
1910+ benes := []* models.CCLFBeneficiary {getCCLFBeneficiary (1 , "MBI1" )}
1911+ jobs , err := svc .createQueueJobs (ctx , args , time.Time {}, benes )
1912+ assert .NoError (t , err )
1913+ assert .Len (t , jobs , 1 )
1914+ assert .Equal (t , constants .Adjudicated , jobs [0 ].DataType )
1915+ }
1916+
18471917func TestSetClaimsDate_Runout (t * testing.T ) {
18481918 pArgs := worker_types.PrepareJobArgs {
18491919 CMSID : "A0000" ,
0 commit comments