Skip to content

Commit

Permalink
fields: Remove 3 asserts for subsidized contracts (TEDEFO-2627)
Browse files Browse the repository at this point in the history
Remove rules BR-BT-00262-0211, BR-BT-00262-0212, BR-BT-00262-0213, to
allow any main nature (works, services, and supplies) for subsidized
contracts.

Also remove those rules from Schematron files.

(cherry picked from commit 2005c29)
  • Loading branch information
bertrand-lorentz committed Oct 31, 2023
1 parent c5ed713 commit f286c99
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 21 deletions.
15 changes: 0 additions & 15 deletions fields/fields.json
Original file line number Diff line number Diff line change
Expand Up @@ -11839,11 +11839,6 @@
"value" : "{ND-LotProcurementScope} ${starts-with(BT-262-Lot,'49') or starts-with(BT-262-Lot,'5') or starts-with(BT-262-Lot,'6') or starts-with(BT-262-Lot,'7') or starts-with(BT-262-Lot,'8') or starts-with(BT-262-Lot,'9')}",
"severity" : "ERROR",
"message" : "rule|text|BR-BT-00262-0209"
}, {
"condition" : "{ND-LotProcurementScope} ${(OPP-070-notice in ('1','4','7','8','9','10','12','16','17','18','19','20','23','25','29','33','36','38')) and (BT-11-Procedure-Buyer in ('org-sub', 'org-sub-cga', 'org-sub-ra', 'org-sub-la')) and (BT-262-Lot is present)}",
"value" : "{ND-LotProcurementScope} ${starts-with(BT-262-Lot,'45')}",
"severity" : "ERROR",
"message" : "rule|text|BR-BT-00262-0212"
} ]
}
}, {
Expand Down Expand Up @@ -11907,11 +11902,6 @@
"value" : "{ND-PartProcurementScope} ${starts-with(BT-262-Part,'49') or starts-with(BT-262-Part,'5') or starts-with(BT-262-Part,'6') or starts-with(BT-262-Part,'7') or starts-with(BT-262-Part,'8') or starts-with(BT-262-Part,'9')}",
"severity" : "ERROR",
"message" : "rule|text|BR-BT-00262-0210"
}, {
"condition" : "{ND-PartProcurementScope} ${(OPP-070-notice in ('1','4','7','8','9','10','12','16','17','18','19','20','23','25','29','33','36','38')) and (BT-11-Procedure-Buyer in ('org-sub', 'org-sub-cga', 'org-sub-ra', 'org-sub-la')) and (BT-262-Part is present)}",
"value" : "{ND-PartProcurementScope} ${starts-with(BT-262-Part,'45')}",
"severity" : "ERROR",
"message" : "rule|text|BR-BT-00262-0213"
} ]
}
}, {
Expand Down Expand Up @@ -11985,11 +11975,6 @@
"value" : "{ND-ProcedureProcurementScope} ${starts-with(BT-262-Procedure,'49') or starts-with(BT-262-Procedure,'5') or starts-with(BT-262-Procedure,'6') or starts-with(BT-262-Procedure,'7') or starts-with(BT-262-Procedure,'8') or starts-with(BT-262-Procedure,'9')}",
"severity" : "ERROR",
"message" : "rule|text|BR-BT-00262-0208"
}, {
"condition" : "{ND-ProcedureProcurementScope} ${(OPP-070-notice in ('1','4','7','8','9','10','12','16','17','18','19','20','23','25','29','33','36','38')) and (BT-11-Procedure-Buyer in ('org-sub', 'org-sub-cga', 'org-sub-ra', 'org-sub-la')) and (BT-262-Procedure is present)}",
"value" : "{ND-ProcedureProcurementScope} ${starts-with(BT-262-Procedure,'45')}",
"severity" : "ERROR",
"message" : "rule|text|BR-BT-00262-0211"
} ]
}
}, {
Expand Down
3 changes: 0 additions & 3 deletions schematrons/dynamic/validation-stage-5.sch
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@
<assert id="BR-BT-00262-0202" role="ERROR" diagnostics="ND-ProcedureProcurementScope_BT-262-Procedure" test="(starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '0') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '1') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '2') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '3') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '40') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '41') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '42') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '43') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '44') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '48')) or not((cbc:ProcurementTypeCode/normalize-space(text()) = 'supplies') and (cac:MainCommodityClassification/cbc:ItemClassificationCode))">rule|text|BR-BT-00262-0202</assert>
<assert id="BR-BT-00262-0205" role="ERROR" diagnostics="ND-ProcedureProcurementScope_BT-262-Procedure" test="(starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '45')) or not((cbc:ProcurementTypeCode/normalize-space(text()) = 'works') and (cac:MainCommodityClassification/cbc:ItemClassificationCode))">rule|text|BR-BT-00262-0205</assert>
<assert id="BR-BT-00262-0208" role="ERROR" diagnostics="ND-ProcedureProcurementScope_BT-262-Procedure" test="(starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '49') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '5') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '6') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '7') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '8') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '9')) or not((cbc:ProcurementTypeCode/normalize-space(text()) = 'services') and (cac:MainCommodityClassification/cbc:ItemClassificationCode))">rule|text|BR-BT-00262-0208</assert>
<assert id="BR-BT-00262-0211" role="ERROR" diagnostics="ND-ProcedureProcurementScope_BT-262-Procedure" test="(starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '45')) or not((../ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NoticeSubType/cbc:SubTypeCode/normalize-space(text()) = ('1','4','7','8','9','10','12','16','17','18','19','20','23','25','29','33','36','38')) and (../cac:ContractingParty/cac:ContractingPartyType/cbc:PartyTypeCode[@listName='buyer-legal-type']/normalize-space(text()) = ('org-sub','org-sub-cga','org-sub-ra','org-sub-la')) and (cac:MainCommodityClassification/cbc:ItemClassificationCode))">rule|text|BR-BT-00262-0211</assert>
</rule>
<rule context="/*/cac:ProcurementProjectLot[cbc:ID/@schemeName='Lot']">
<assert id="BR-BT-00137-0200" role="ERROR" diagnostics="BT-137-Lot" test="(../ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NoticeSubType/cbc:SubTypeCode/normalize-space(text()) = ('7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','E4') and (cac:TenderingTerms/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:SelectionCriteria/cbc:CriterionTypeCode[@listName='selection-criterion']/normalize-space(text()) = 'sui-act') and (cac:TenderingTerms/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:SelectionCriteria/cbc:CriterionTypeCode[@listName='selection-criterion']/normalize-space(text()) = 'ef-stand') and (cac:TenderingTerms/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:SelectionCriteria/cbc:CriterionTypeCode[@listName='selection-criterion']/normalize-space(text()) = 'tp-abil')) or ((../ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NoticeSubType/cbc:SubTypeCode/normalize-space(text()) = 'E4') and not(cac:TenderingTerms/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:SelectionCriteria/cbc:CriterionTypeCode[@listName='selection-criterion']/normalize-space(text()) = 'sui-act') and not(cac:TenderingTerms/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:SelectionCriteria/cbc:CriterionTypeCode[@listName='selection-criterion']/normalize-space(text()) = 'ef-stand') and not(cac:TenderingTerms/ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:SelectionCriteria/cbc:CriterionTypeCode[@listName='selection-criterion']/normalize-space(text()) = 'tp-abil')) or (not(../ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NoticeSubType/cbc:SubTypeCode/normalize-space(text()) = ('7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','24','E4')))">rule|text|BR-BT-00137-0200</assert>
Expand All @@ -53,7 +52,6 @@
<assert id="BR-BT-00262-0203" role="ERROR" diagnostics="ND-LotProcurementScope_BT-262-Lot" test="(starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '0') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '1') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '2') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '3') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '40') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '41') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '42') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '43') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '44') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '48')) or not((cbc:ProcurementTypeCode[@listName='contract-nature']/normalize-space(text()) = 'supplies') and (cac:MainCommodityClassification/cbc:ItemClassificationCode))">rule|text|BR-BT-00262-0203</assert>
<assert id="BR-BT-00262-0206" role="ERROR" diagnostics="ND-LotProcurementScope_BT-262-Lot" test="(starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '45')) or not((cbc:ProcurementTypeCode[@listName='contract-nature']/normalize-space(text()) = 'works') and (cac:MainCommodityClassification/cbc:ItemClassificationCode))">rule|text|BR-BT-00262-0206</assert>
<assert id="BR-BT-00262-0209" role="ERROR" diagnostics="ND-LotProcurementScope_BT-262-Lot" test="(starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '49') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '5') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '6') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '7') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '8') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '9')) or not((cbc:ProcurementTypeCode[@listName='contract-nature']/normalize-space(text()) = 'services') and (cac:MainCommodityClassification/cbc:ItemClassificationCode))">rule|text|BR-BT-00262-0209</assert>
<assert id="BR-BT-00262-0212" role="ERROR" diagnostics="ND-LotProcurementScope_BT-262-Lot" test="(starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '45')) or not((../../ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NoticeSubType/cbc:SubTypeCode/normalize-space(text()) = ('1','4','7','8','9','10','12','16','17','18','19','20','23','25','29','33','36','38')) and (../../cac:ContractingParty/cac:ContractingPartyType/cbc:PartyTypeCode[@listName='buyer-legal-type']/normalize-space(text()) = ('org-sub','org-sub-cga','org-sub-ra','org-sub-la')) and (cac:MainCommodityClassification/cbc:ItemClassificationCode))">rule|text|BR-BT-00262-0212</assert>
</rule>
<rule context="/*/cac:ProcurementProjectLot[cbc:ID/@schemeName='Lot']/cac:ProcurementProject/cac:PlannedPeriod">
<assert id="BR-BT-00036-0150" role="ERROR" diagnostics="BT-36-Lot" test="((boolean(for $T in (current-date()) return ($T + (for $F in cbc:DurationMeasure return (if ($F/@unitCode='WEEK') then xs:dayTimeDuration(concat('P', $F/number() * 7, 'D')) else if ($F/@unitCode='DAY') then xs:dayTimeDuration(concat('P', $F/number(), 'D')) else if ($F/@unitCode='YEAR') then xs:yearMonthDuration(concat('P', $F/number(), 'Y')) else if ($F/@unitCode='MONTH') then xs:yearMonthDuration(concat('P', $F/number(), 'M')) else ())) > $T + xs:dayTimeDuration('P0D')))) and (boolean(for $T in (current-date()) return ($T + (for $F in cbc:DurationMeasure return (if ($F/@unitCode='WEEK') then xs:dayTimeDuration(concat('P', $F/number() * 7, 'D')) else if ($F/@unitCode='DAY') then xs:dayTimeDuration(concat('P', $F/number(), 'D')) else if ($F/@unitCode='YEAR') then xs:yearMonthDuration(concat('P', $F/number(), 'Y')) else if ($F/@unitCode='MONTH') then xs:yearMonthDuration(concat('P', $F/number(), 'M')) else ())) &lt;= $T + xs:yearMonthDuration('P3Y'))))) or not((../../cac:TenderingTerms/cac:TendererQualificationRequest[not(cbc:CompanyLegalFormCode)][not(cac:SpecificTendererRequirement/cbc:TendererRequirementTypeCode[@listName='missing-info-submission'])]/cac:SpecificTendererRequirement/cbc:TendererRequirementTypeCode[@listName='reserved-procurement']/normalize-space(text()) = 'res-pub-ser') and (cbc:DurationMeasure))">rule|text|BR-BT-00036-0150</assert>
Expand Down Expand Up @@ -259,7 +257,6 @@
<assert id="BR-BT-00262-0204" role="ERROR" diagnostics="ND-PartProcurementScope_BT-262-Part" test="(starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '0') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '1') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '2') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '3') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '40') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '41') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '42') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '43') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '44') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '48')) or not((cbc:ProcurementTypeCode[@listName='contract-nature']/normalize-space(text()) = 'supplies') and (cac:MainCommodityClassification/cbc:ItemClassificationCode))">rule|text|BR-BT-00262-0204</assert>
<assert id="BR-BT-00262-0207" role="ERROR" diagnostics="ND-PartProcurementScope_BT-262-Part" test="(starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '45')) or not((cbc:ProcurementTypeCode[@listName='contract-nature']/normalize-space(text()) = 'works') and (cac:MainCommodityClassification/cbc:ItemClassificationCode))">rule|text|BR-BT-00262-0207</assert>
<assert id="BR-BT-00262-0210" role="ERROR" diagnostics="ND-PartProcurementScope_BT-262-Part" test="(starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '49') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '5') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '6') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '7') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '8') or starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '9')) or not((cbc:ProcurementTypeCode[@listName='contract-nature']/normalize-space(text()) = 'services') and (cac:MainCommodityClassification/cbc:ItemClassificationCode))">rule|text|BR-BT-00262-0210</assert>
<assert id="BR-BT-00262-0213" role="ERROR" diagnostics="ND-PartProcurementScope_BT-262-Part" test="(starts-with(cac:MainCommodityClassification/cbc:ItemClassificationCode/normalize-space(text()), '45')) or not((../../ext:UBLExtensions/ext:UBLExtension/ext:ExtensionContent/efext:EformsExtension/efac:NoticeSubType/cbc:SubTypeCode/normalize-space(text()) = ('1','4','7','8','9','10','12','16','17','18','19','20','23','25','29','33','36','38')) and (../../cac:ContractingParty/cac:ContractingPartyType/cbc:PartyTypeCode[@listName='buyer-legal-type']/normalize-space(text()) = ('org-sub','org-sub-cga','org-sub-ra','org-sub-la')) and (cac:MainCommodityClassification/cbc:ItemClassificationCode))">rule|text|BR-BT-00262-0213</assert>
</rule>
<rule context="/*/cac:ProcurementProjectLot[cbc:ID/@schemeName='Part']/cac:ProcurementProject/cac:PlannedPeriod">
<assert id="BR-BT-00036-0151" role="ERROR" diagnostics="BT-36-Part" test="((boolean(for $T in (current-date()) return ($T + (for $F in cbc:DurationMeasure return (if ($F/@unitCode='WEEK') then xs:dayTimeDuration(concat('P', $F/number() * 7, 'D')) else if ($F/@unitCode='DAY') then xs:dayTimeDuration(concat('P', $F/number(), 'D')) else if ($F/@unitCode='YEAR') then xs:yearMonthDuration(concat('P', $F/number(), 'Y')) else if ($F/@unitCode='MONTH') then xs:yearMonthDuration(concat('P', $F/number(), 'M')) else ())) > $T + xs:dayTimeDuration('P0D')))) and (boolean(for $T in (current-date()) return ($T + (for $F in cbc:DurationMeasure return (if ($F/@unitCode='WEEK') then xs:dayTimeDuration(concat('P', $F/number() * 7, 'D')) else if ($F/@unitCode='DAY') then xs:dayTimeDuration(concat('P', $F/number(), 'D')) else if ($F/@unitCode='YEAR') then xs:yearMonthDuration(concat('P', $F/number(), 'Y')) else if ($F/@unitCode='MONTH') then xs:yearMonthDuration(concat('P', $F/number(), 'M')) else ())) &lt;= $T + xs:yearMonthDuration('P3Y'))))) or not((../../cac:TenderingTerms/cac:TendererQualificationRequest[not(cbc:CompanyLegalFormCode)][not(cac:SpecificTendererRequirement/cbc:TendererRequirementTypeCode[@listName='missing-info-submission'])]/cac:SpecificTendererRequirement[cbc:TendererRequirementTypeCode/@listName='reserved-procurement']/cbc:TendererRequirementTypeCode[@listName='reserved-procurement']/normalize-space(text()) = 'res-pub-ser') and (cbc:DurationMeasure))">rule|text|BR-BT-00036-0151</assert>
Expand Down
Loading

0 comments on commit f286c99

Please sign in to comment.