[AIXM-599] Add weekly holidays to SpecialDate
ID: | AIXM-599 |
target version: | AIXM 5.2 |
version: | 1.0 |
last updated: | 03 MAR 2023 |
status: | APPROVED |
Description
A new weekDay attribute is added in the SpecialDate class.
Rationale for change
See https://aixmccb.atlassian.net/browse/AIXM-591
Timesheets can be defined with day and dayTill = WORK_DAY, BEF_WORK_DAY or AFT_WORK_DAY, but there is no way to specify which days of the week are work days and which are holidays for a given State.
It is proposed to adapt SpecialDate to support such a definition, by adding a property "weekDay" as a code list of each day of the week.
Impact assessment
[FWD_1:1] No data mapping is necessary and no data loss occurs when data is exchanged from a system (A) that uses AIXM 5.1.1 for output towards a system (B) that uses AIXM 5.2 for input.
[BWD_MAP_LOSS] Data mapping is possible, but some data would be lost (or converted into Notes) when data is exchanged from a system (B) that uses AIXM 5.2 for output towards a system (A) that uses AIXM 5.1.1 for input.
Change Proposal details
In the UML model:
- In the SpecialDate class add a new attribute:
- weekDay, data type CodeWeekDayType, definition = “A weekly non-working day (weekly holiday).”
- Add an new CodeWeekDayDateBaseType data type, stereotype <<CodeList>>, definition = “A code indicating a week day”, allowable values:
- MON = Monday
- TUE = Tuesday
- WED = Wednesday
- THU = Thursday
- FRI = Friday
- SAT = Saturday
- SUN = Sunday
- OTHER = Other.
- Add a new CodeWeekDayDateType data type, stereotype <<datatype>>, definition = “A complex data type that enables the provision of a NIL reason for any attribute using this type.”, attributes:
- nilReason, type NilReasonEnumeration
The following UML class diagram shows the new attribute and data type:
Mapping AIXM 5.1.1 to AIXM 5.2 (forward)
Not applicable.
Mapping AIXM 5.2 to AIXM 5.1.1 (backward)
The following algorithm shall be applied:
- [MAPC-02] For each SpecialDate that has a weekDay child element, from the three backward mapping options available, the first two (discard the value or use an extension) are straightforward and do not need any further details. The 3rd option (backward mapping into a Note) is detailed in order to provide a complete description of this case and its conversion option. The following mapping into Note algorithm is proposed:
- Add an annotation.Note associated with the owner class having
- purpose=“OTHER:BACKWARD_MAPPING”;
- LinguisticNote.note=”weekDay: <value of weekDay>;
Remove the weekDay element
Mapping example
(Note: for mapping test data see: https://github.com/aixm/mapping_52_511/tree/master/AIXM-xxx)
AIXM Input | AIXM Output |
---|---|