Skip to content

form_of

Python reference for nagasim.appearance.form_of. Provisional: it may change between minor versions, see Appearance.

The form one entity type draws as, from its name and icon; one of FORMS.

In order: a pallet carrier or a name with PALLET is a pallet; then the row's icon; then a word of the name (a prop such as STRETCHER, a person, a vehicle, a container, an information item drawn as a disc); else a carton. The size rule (a sized disc is a carton) belongs to forms_of, so call forms_of for a whole model.

Parameters:

Name Type Description Default
row mapping

An Entities row, or {"name": TYPE} for a type with no row.

required
pallet_carriers frozenset of str

The upper-cased carrier_types of BATCH blocks with a pattern.

required

Returns:

Type Description
str

carton, container, pallet, person, vehicle, disc or prop.

See Also

nagasim.appearance.forms_of : The form and size of every entity type of a model.

Examples:

>>> from nagasim.appearance import form_of
>>> form_of({"name": "PATIENT"}, frozenset())
'person'