In order for the generation of the excel spreadsheet the following dependencies must be installed.
Follow the above link or if on mac with brew
brew cask install docker
Follow the above link or if on mac with brew
brew install jq
All the JSON files have been added to definition
directory. Each file represents one tab on the CCD excel file.
-
New fields are defined in the
CaseField.json
file. At their most basic they require:LiveFrom
a live from date - this does nothing in the definitionCaseTypeID
the case type ID that the field belongs toID
a unique ID - Field IDs should be understandableLabel
a label that will be rendered in the UIFieldType
the type of field - a comprehensive list of types can be found here.SecurityClassification
a security classification to allow basic access management - for the prototype this will always be public
An example of a field:
{ "LiveFrom": "03/12/2019", "CaseTypeID": "PrototypeUnspecifiedClaims", "ID": "litigationFriend", "Label": "Provide litigation friend details", "FieldType": "LitigationFriend", "SecurityClassification": "Public" }
-
These fields then need to be added to an event in order to appear in the UI. This is done using the
CaseEventToFields.json
file where aCaseEventID
(defined inCaseEvents.json
) is linked to aCaseFieldID
. Within this file you can set:CaseEventID
the event the field will appear in.CaseFieldID
the field to appear in the event.PageFieldDisplayOrder
to define the order the fields will appear on the page.DisplayContext
eitherREADONLY
,OPTIONAL
orMANDATORY
.PageID
to define the page and what the final part of the URL will look like - this should be the same value for all fields on the same page.PageDisplayOrder
to define where the page will appear in the event flow.ShowSummaryChangeOption
to define if the field should appear in a check your answers still page at the end of the event.
Example of an entry in
CaseEventToFields.json
:{ "LiveFrom": "01/12/2019", "CaseTypeID": "PrototypeUnspecifiedClaims", "CaseEventID": "createClaim", "CaseFieldID": "eligibilityQuestions", "PageFieldDisplayOrder": 1, "DisplayContext": "READONLY", "PageID": "Eligibility", "PageDisplayOrder": 1, "ShowSummaryChangeOption": "N" }
-
The last step for making fields appear is to ensure that the
IDAM
orCase role
has the correct permissions in the Authorisation files. There are authorisation files forState
,CaseType
,Event
,Field
andComplexTypes
.AuthorisationCaseField.json
is used to define CRUD permissions at a field level. If the field is a complex type the permissions you set will be the same for all nested fields.AuthorisationComplexTypes.json
is used to define more granular CRUD permissions for each field within a complex type.- C - Create (required to save a value for the first time)
- R - Read (required to see a value)
- U - Update (required to change a value)
- D - Delete (required to delete an existing value)
For the purpose of the prototype all fields could have all four permissions.
Example of an entry in
AuthorisationCaseField.json
:
{
"LiveFrom": "01/12/2019",
"CaseTypeID": "PrototypeUnspecifiedClaims",
"CaseFieldID": "caseName",
"UserRole": "caseworker-civil",
"CRUD": "CRUD"
}
Fields can be shown and hidden using the FieldShowCondition
column.
Please refer to the CCD walkthrough of show hide conditions for more information.
An example of a field show condition can be found below:
"FieldShowCondition": "reachedAgreement = \"No\"",
Note: when defining in json it is important to include \"
before and after the show condition so that the definition process escapes these characters.
In the definition file this will appear as reachedAgreement = "No"
To hide fields within an event use FieldShowCondition
in CaseEventToFields.json
to define show hide conditions
To hide fields within a complex type use FieldShowCondition
in ComplexTypes.json
to define show hide conditions
Fixed list type fields "FieldType": "FixedList"
are populated using the FieldTypeParameter
column in ccd definition,
which is defined in FixedLists.json
using the ID
field.
An example entry:
{
"ID": "PartyType",
"ListElementCode": "INDIVIDUAL",
"ListElement": "Individual",
"DisplayOrder": 1
},
Where
ID
is the ID of the fixed list and what is used forFieldTypeParameter
ListElementCode
the CCD reference to the specific element (used in show conditions)ListElement
the value the element will have on screenDisplayOrder
the order the elements in the list should be display
DisplayOrder
should always be set to avoid lists changing order.
The CCD definition glossary has a wealth of information about what each field in the definition files / tabs represent.
To run this file Docker
must be up and running. To start this, click on the application and wait for it to be fully up.
To generate a xlsx file from the JSON files run the following command from the project root (unspec-prototype) in the terminal:
./bin/generate-excel-definition.sh
Use cd
to navigate through your directories in terminal and ls
to list all files in a directory.
This will generate a definition file in excel-definition
directory in the following format:
unspec-prototype-day-month-year_hour-minute-seconds-commithash.xlsx
The commit hash will help identify which version is running on which environment.
To upload definition file to AAT you will first need to connect to VPN.
Follow the below upload definition URL and click Import case definition
link in top left.
To view the uploaded prototype definition go to the aat environment and select
- Jurisdiction:
Civil
- Case type:
Prototype Unspecified Claims
.
VPN not required for demo
Follow the below upload definition URL and click Import case definition
link in top left.
To view the prototype definition go to the demo environment and select
- Jurisdiction:
Civil
- Case type:
Prototype Unspecified Claims
.