Skip to content

Commit

Permalink
output/content/eforms/operations.md: Add convert a duration to a numb…
Browse files Browse the repository at this point in the history
…er of days
  • Loading branch information
duncandewhurst committed Jan 30, 2025
1 parent 8668325 commit 9acbad7
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
16 changes: 16 additions & 0 deletions output/content/eforms/operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,22 @@ Look up the code in the [ISO 639-3 code tables](https://iso639-3.sil.org/code_ta

If the code has no correspondence in ISO 639-1, contact the [OCDS Data Support Team](mailto:[email protected]).

## Convert a duration to a number of days

If `@unitCode` is 'DAY' or 'CALENDAR_DAY', do nothing.

Otherwise, multiply the duration according to the value of `@unitCode`:

| `@unitCode` | Multiplier |
| --- | --- |
| WEEK | 7 |
| MONTH | 30 |
| QUARTER | 91 |
| YEAR_HALF | 182 |
| YEAR | 365 |

If the value of `@unitCode` does not appear in the above table, contact the [OCDS Data Support Team](mailto:[email protected]).

## Add a complaints statistic

Add a `Statistic` object to the `statistics` array, set its `.relatedLot` to the value of `ancestor::efac:LotResult/efac:TenderLot/cbc:ID`, set its `scope` to 'complaints', and set its `.id` (string) sequentially across all notices for this procedure. For example, if a first notice for a given procedure has nine statistics, it uses `id`'s '1' through '9'. A second notice for the same procedure then uses `id`'s '10' and up, etc.
Expand Down
9 changes: 4 additions & 5 deletions output/mapping/eforms/guidance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7675,8 +7675,8 @@
- TED_EXPORT/FORM_SECTION/F25_2014/OBJECT_CONTRACT/OBJECT_DESCR/DURATION
eForms guidance: |-
- [Get the lot for the ProcurementProjectLot](operations.md#get-the-lot-for-a-procurementprojectlot).
- If `@unitCode` is "DAY", map to the lot's `.contractPeriod.durationInDays`.
- If `@unitCode` is "MONTH", multiply by 30. If `@unitCode` is "YEAR", multiply by 365. In either case, map the result to the lot's `.contractPeriod.durationInDays`.
- [Convert the duration to a number of days](operations.md#convert-a-duration-to-a-number-of-days)
- Map to the lot's `.contractPeriod.durationInDays`.
eForms example: <cac:ProcurementProjectLot><cbc:ID schemeName="Lot">LOT-0001</cbc:ID><cac:ProcurementProject><cac:PlannedPeriod><cbc:DurationMeasure unitCode="DAY">3</cbc:DurationMeasure></cac:PlannedPeriod></cac:ProcurementProject></cac:ProcurementProjectLot>
OCDS example: '{"tender":{"lots":[{"id":"LOT-0001","contractPeriod":{"durationInDays":3}}]}}'
sdk: https://docs.ted.europa.eu/eforms/latest/schema/procedure-lot-part-information.html#plannedPeriodSection
Expand All @@ -7695,9 +7695,8 @@
- TED_EXPORT/FORM_SECTION/PRIOR_INFORMATION_DEFENCE/FD_PRIOR_INFORMATION_DEFENCE/OBJECT_WORKS_SUPPLIES_SERVICES_PRIOR_INFORMATION/SCHEDULED_DATE_PERIOD/PERIOD_WORK_DATE_STARTING/MONTHS
- TED_EXPORT/FORM_SECTION/CONTRACT_DEFENCE/FD_CONTRACT_DEFENCE/OBJECT_CONTRACT_INFORMATION_DEFENCE/PERIOD_WORK_DATE_STARTING/(MONTHS|DAYS)
eForms guidance: |-
- If `@unitCode` is "DAY", map to `tender.contractPeriod.durationInDays`.
- If `@unitCode` is "MONTH", multiply by 30. If `@unitCode` is "YEAR", multiply by 365. In either case, map the result to `tender.contractPeriod.durationInDays`.
- If `@unitCode` is a specific day of the week or month, map an equivalent number of days to `tender.contractPeriod.durationInDays`.
- [Convert the duration to a number of days](operations.md#convert-a-duration-to-a-number-of-days)
- Map to `tender.contractPeriod.durationInDays`.
eForms example: <cac:PlannedPeriod><cbc:DurationMeasure unitCode="DAY">3</cbc:DurationMeasure></cac:PlannedPeriod>
OCDS example: '{"tender":{"contractPeriod":{"durationInDays":3}}}'
sdk: https://docs.ted.europa.eu/eforms/latest/schema/procedure-lot-part-information.html#plannedPeriodSection
Expand Down

0 comments on commit 9acbad7

Please sign in to comment.