Expand description
As-built records: hardware as it was really built.
An as-built item (type as_built, numbers AB-…) is one physical
unit or lot. It has the usual lifecycle, revisions, files (photos,
measurement reports, a 3D scan, the traveller) and change orders. A new
revision of the as-built item is a new state of the same unit (rework,
repair, retrofit); the old revision stays for traceability. On top of
that an as-built revision has
- a build record – the design revision (part, assembly or software) the unit was built to, serial or lot number, build date and note. The serial number is unique per design item. The design revision may be in work, in review or released (prototypes are built before the release); an obsolete revision is refused for a new record;
- deviations – how the unit departs from its design (kind, feature, as designed, as built) and the disposition (open, use as is, rework, repair, scrap);
- its BOM – the regular BOM of the revision, holding what was really
installed.
record_unitstarts it as a copy of the design’s BOM; the BOM comparison between the design and the as-built revision shows the differences.
Record and deviations belong to the revision like BOM lines: changed only
while it is checked out, copied by Revise, frozen at release. A change
order with an as-built revision cannot be submitted while that revision
has no build record or an open deviation (ensure_ready).
Structs§
- Build
Record - What an as-built revision was built to.
- Built
Unit - A unit built to a revision of a design item (the latest revision of its as-built item).
- Concession
Review - What the revision page shows about concessions: whether the group wants each “use as is” deviation confirmed, and whether the actor may confirm (a reviewer of a change order in review that contains the revision).
- Deviation
- How the built unit departs from its design.
- Deviation
Input - A deviation as entered.
- Deviation
Patch - Changed fields of a deviation;
Nonekeeps the stored value (patch_deviation). - Deviation
Summary - Deviation counts of an as-built revision.
- NewUnit
- A new physical unit built to a design revision (
record_unit). - Record
Input - The build record as entered.
Constants§
- MAX_
DEVIATIONS - At most this many deviations per as-built revision.
- MAX_
UNITS_ LISTED - At most this many built units are listed on a design item.
Functions§
- add_
deviation - Adds a deviation to an as-built revision checked out by the actor.
- built_
units - Units built to any revision of the design item the actor may see (at
most
MAX_UNITS_LISTED); the second value counts the hidden ones. - concession_
review - confirm_
concession - A reviewer confirms a “use as is” deviation of an as-built revision in review – the separate acceptance of a concession (#152 step 9).
- deviations
- The deviations of an as-built revision the actor may read.
- get_
deviation - newer_
design - “PRT-1/C is released (built to: B)” when a design revision newer than the one the unit was built to is released (pure).
- parse_
built_ on - Parses an optional build date (
YYYY-MM-DD; empty = none). - patch_
deviation - Changes the given fields of a deviation of an as-built revision checked out by the actor. The stored deviation is read and merged while the revision row is locked – every writer of a deviation holds that lock – so two concurrent changes cannot overwrite each other’s fields.
- record
- The build record of an as-built revision the actor may read (
Nonewhile none was entered). - record_
unit - Records a physical unit built to the design revision
design_revision_id: creates the as-built item (revision A, checked out by the actor) with its build record and, optionally, the design’s BOM – in one transaction. - remove_
deviation - Removes a deviation from an as-built revision checked out by the actor.
- set_
record - Sets the build record of an as-built revision checked out by the actor.
- summarize
- update_
deviation - Replaces every field of a deviation of an as-built revision checked out by the actor.