From edd636094b88e30c8eb4403a43aeabee77c71186 Mon Sep 17 00:00:00 2001 From: George Lund Date: Thu, 10 Aug 2023 13:32:27 +0100 Subject: [PATCH 01/19] Add life event for death registration and registration update - refactored JWT slots into common as we will reuse for security event tokens (SETs) - add descriptions as metadata for various elements as required for death notifications - add "sex" representing legal sex (not for use in One Login) - add sample death registration event TODO - sample death registration update event WIP - validation fails because we can't yet represent partial dates --- scripts/generate_json_schemas.sh | 2 + scripts/test | 1 + .../LifeEventSETClass/death-registration.json | 80 +++++++++++++++++++ v1/linkml-schemas/common.yaml | 36 ++++++++- v1/linkml-schemas/credentials.yaml | 31 +------ v1/linkml-schemas/events.yaml | 28 +++++++ v1/linkml-schemas/lifeEvents.yaml | 74 +++++++++++++++++ v1/linkml-schemas/name.yaml | 1 + v1/linkml-schemas/person.yaml | 24 ++++-- 9 files changed, 239 insertions(+), 38 deletions(-) create mode 100644 v1/examples/LifeEventSETClass/death-registration.json create mode 100644 v1/linkml-schemas/events.yaml create mode 100644 v1/linkml-schemas/lifeEvents.yaml diff --git a/scripts/generate_json_schemas.sh b/scripts/generate_json_schemas.sh index 9669c8c..0774520 100644 --- a/scripts/generate_json_schemas.sh +++ b/scripts/generate_json_schemas.sh @@ -25,6 +25,8 @@ LINKML_ITEMS=( "name.yaml,NameClass,Name.json" "credentials.yaml,IssuerAuthorizationRequestClass,IssuerAuthorizationRequest.json" "credentials.yaml,OpenIDConnectAuthenticationRequestClass,OpenIDConnectAuthenticationRequest.json" + "lifeEvents.yaml,DeathRegistrationSETClass,DeathRegistrationSET.json", + "lifeEvents.yaml,DeathRegistrationUpdateSETClass,DeathRegistrationUpdateSET.json" ) ROOT_DIR="$( git rev-parse --show-toplevel )" diff --git a/scripts/test b/scripts/test index d1fc22e..9f954a1 100755 --- a/scripts/test +++ b/scripts/test @@ -9,3 +9,4 @@ ajv validate -c ajv-formats -s $HERE/../v1/json-schemas/IdentityCheckCredentialJ ajv validate -c ajv-formats -s $HERE/../v1/json-schemas/IdentityCheckCredentialJWT.json -d $HERE/../v1/examples/identity-check-jwt.json ajv validate -c ajv-formats -s $HERE/../v1/json-schemas/IssuerAuthorizationRequest.json -d $HERE/../v1/examples/core-cri-authz-request.json ajv validate -c ajv-formats -s $HERE/../v1/json-schemas/OpenIDConnectAuthenticationRequest.json -d $HERE/../v1/examples/rp-authz-request.json +ajv validate -c ajv-formats -s $HERE/../v1/json-schemas/DeathRegistrationSET.json -d $HERE/../v1/examples/LifeEventSETClass/death-registration.json diff --git a/v1/examples/LifeEventSETClass/death-registration.json b/v1/examples/LifeEventSETClass/death-registration.json new file mode 100644 index 0000000..27192df --- /dev/null +++ b/v1/examples/LifeEventSETClass/death-registration.json @@ -0,0 +1,80 @@ +{ + "iss": "https://scim.example.com", + "iat": 1691637001, + "jti": "4d3559ec67504aaba65d40b0363faad8", + "toe": 1691637178, + "events": { + "https://ssf.account.gov.uk/v1/deathRegistration": { + "subject": { + "name": [ + { + "nameParts": [ + { + "value": "Velma", + "type": "GivenName" + }, + { + "value": "Rogers", + "type": "FamilyName" + } + ] + }, + { + "nameParts": [ + { + "value": "Velma", + "type": "GivenName" + }, + { + "value": "Smith", + "type": "FamilyName" + } + ], + "description": "Otherwise or formerly known as" + }, + { + "nameParts": [ + { + "value": "Velma", + "type": "GivenName" + }, + { + "value": "Molone", + "type": "FamilyName" + } + ], + "description": "Name before marriage" + } + ], + "sex": [ + { + "value": "Female" + } + ], + "birthDate": [ + { + "value": "1989-07-06", + "description": "May be incorrect" + } + ], + "address": [ + { + "subBuildingName": "Flat 4", + "buildingNumber": "5", + "streetName": "Mystery Street", + "addressLocality": "Coolsville", + "postalCode": "M15 7", + "addressCountry": "US" + } + ] + }, + "deathRegistrationID": 123456, + "deathDate": { + "value": "1989-07", + "description": "Deceased found on 3 August 1989", + "verificationLevel": 3 + }, + "freeFormatDeathDate": "Unknown due to mortuary error but some time in July 1989" + } + } +} diff --git a/v1/linkml-schemas/common.yaml b/v1/linkml-schemas/common.yaml index 14a7e37..41c5c41 100644 --- a/v1/linkml-schemas/common.yaml +++ b/v1/linkml-schemas/common.yaml @@ -6,11 +6,20 @@ prefixes: imports: - linkml:types default_curi_maps: - - semweb_context + - semweb_context default_prefix: di_vocab default_range: string classes: + JWTClass: + slots: + - iss + - sub + - nbf + - exp + - aud + - iat + - jti ValidityClass: abstract: true mixin: true @@ -37,6 +46,8 @@ slots: value: required: true slot_uri: schema:value + description: + slot_uri: schema:description "@context": range: string multivalued: true @@ -46,4 +57,25 @@ slots: slot_uri: schema:validFrom validUntil: range: date - slot_uri: schema:validUntil \ No newline at end of file + slot_uri: schema:validUntil + iss: + range: uri + description: The `iss` (issuer) claim identifies the principal that issued the JWT. + sub: + range: uri + description: The `sub` (subject) claim identifies the principal that is the subject of the JWT. + nbf: + range: integer + description: The `nbf` (not before) claim identifies the time the JWT is valid from. + exp: + range: integer + description: The `exp` (expiration time) claim identifies the time the JWT expires. + iat: + range: integer + description: The `iat` (issued at) claim identifies the time at which the JWT was issued. + aud: + range: uri + description: The `aud` (audience) claim identifies the recipients that the JWT is intended for. + jti: + range: uri + description: The `jti` (JWT ID) claim identifies the unique identifier of the JWT. diff --git a/v1/linkml-schemas/credentials.yaml b/v1/linkml-schemas/credentials.yaml index f730afe..79e682a 100644 --- a/v1/linkml-schemas/credentials.yaml +++ b/v1/linkml-schemas/credentials.yaml @@ -10,6 +10,7 @@ prefixes: di_vocab: https://vocab.account.gov.uk/v1/ imports: - linkml:types + - ./common - ./person - ./evidence - ./vectorsOfTrust @@ -22,15 +23,6 @@ default_prefix: di_vocab default_range: string classes: - JWTClass: - slots: - - iss - - sub - - nbf - - exp - - aud - - iat - - jti AuthorizationRequestClass: is_a: JWTClass slots: @@ -114,27 +106,6 @@ slots: range: JWS multivalued: true inlined_as_list: true - iss: - range: uri - description: The `iss` (issuer) claim identifies the principal that issued the JWT. - sub: - range: uri - description: The `sub` (subject) claim identifies the principal that is the subject of the JWT. - nbf: - range: integer - description: The `nbf` (not before) claim identifies the time the JWT is valid from. - exp: - range: integer - description: The `exp` (expiration time) claim identifies the time the JWT expires. - iat: - range: integer - description: The `iat` (issued at) claim identifies the time at which the JWT was issued. - aud: - range: uri - description: The `aud` (audience) claim identifies the recipients that the JWT is intended for. - jti: - range: uri - description: The `jti` (JWT ID) claim identifies the unique identifier of the JWT. vc: range: VerifiableCredentialClass credentialSubject: diff --git a/v1/linkml-schemas/events.yaml b/v1/linkml-schemas/events.yaml new file mode 100644 index 0000000..76d9804 --- /dev/null +++ b/v1/linkml-schemas/events.yaml @@ -0,0 +1,28 @@ +id: https://vocab.account.gov.uk/linkml/events-schema +name: events +version: 1.0 +description: >- + Vocabulary and schemas for events in One Login and the Life Events Platform. + +prefixes: + linkml: https://w3id.org/linkml/ + vc: https://www.w3.org/2018/credentials/v1/ + di_vocab: https://vocab.account.gov.uk/v1/ +imports: + - linkml:types + - ./common +default_curi_maps: + - semweb_context +default_prefix: di_vocab +default_range: string + +classes: + SETClass: + is_a: JWTClass + slots: + - toe + +slots: + toe: + range: integer + description: A value that represents the date and time at which the event occurred. This value is a NumericDate (see Section 2 of RFC7519). diff --git a/v1/linkml-schemas/lifeEvents.yaml b/v1/linkml-schemas/lifeEvents.yaml new file mode 100644 index 0000000..7dc31e1 --- /dev/null +++ b/v1/linkml-schemas/lifeEvents.yaml @@ -0,0 +1,74 @@ +id: https://vocab.account.gov.uk/linkml/life-events-schema +name: lifeEvents +version: 1.0 +description: >- + Vocabulary for life events + +prefixes: + linkml: https://w3id.org/linkml/ + vc: https://www.w3.org/2018/credentials/v1/ + di_vocab: https://vocab.account.gov.uk/v1/ +imports: + - linkml:types + - ./events + - ./person +default_curi_maps: + - semweb_context +default_prefix: di_vocab +default_range: string + +classes: + DeathRegistrationSETClass: + is_a: SETClass + attributes: + events: + range: DeathRegistrationEventMappingClass + required: true + DeathRegistrationEventMappingClass: + attributes: + "deathRegistrationUpdate": + range: DeathRegistrationEventClass + required: true + alias: "https://ssf.account.gov.uk/v1/deathRegistration" + DeathRegistrationUpdateSETClass: + is_a: SETClass + attributes: + events: + range: DeathRegistrationUpdateEventMappingClass + required: true + DeathRegistrationUpdateEventMappingClass: + attributes: + "deathRegistrationUpdate": + range: DeathRegistrationEventClass + required: true + alias: "https://ssf.account.gov.uk/v1/deathRegistrationUpdate" + DeathRegistrationEventClass: + slots: + - deathRegistrationID + - subject + - deathDate + - freeFormatDeathDate + DeathDateClass: + mixins: + - ValidityClass + attributes: + value: + range: date + slots: + - description + - verificationLevel + +slots: + subject: + range: PersonClass + deathDate: + range: DeathDateClass + slot_uri: schema:deathDate + freeFormatDeathDate: + description: Free format date of death of deceased person. + deathRegistrationID: + description: Registration ID on the RON system + range: integer + verificationLevel: + range: integer + description: TBC what this really means \ No newline at end of file diff --git a/v1/linkml-schemas/name.yaml b/v1/linkml-schemas/name.yaml index 3dee268..8649318 100644 --- a/v1/linkml-schemas/name.yaml +++ b/v1/linkml-schemas/name.yaml @@ -46,6 +46,7 @@ classes: - ValidityClass slots: - nameParts + - description NamePartClass: description: Abstract class to define a name part value and name part type for an optional validity period. diff --git a/v1/linkml-schemas/person.yaml b/v1/linkml-schemas/person.yaml index ad67be1..f4f0597 100644 --- a/v1/linkml-schemas/person.yaml +++ b/v1/linkml-schemas/person.yaml @@ -12,7 +12,7 @@ imports: - ./address - ./document default_curi_maps: - - semweb_context + - semweb_context default_prefix: di_vocab default_range: string @@ -20,7 +20,7 @@ classes: CredentialSubjectClass: PersonClass: - mixins: + mixins: - PersonIdentityClass is_a: CredentialSubjectClass class_uri: schema:Person @@ -31,7 +31,8 @@ classes: - residencePermit - socialSecurityRecord - idCard - + - sex + PersonIdentityClass: is_a: CredentialSubjectClass slots: @@ -44,7 +45,13 @@ classes: attributes: value: range: date - + slots: + - description + + SexClass: + slots: + - value + AddressClass: is_a: CredentialSubjectClass slots: @@ -79,8 +86,13 @@ slots: socialSecurityRecord: range: SocialSecurityRecordDetailsClass multivalued: true - inlined_as_list: true + inlined_as_list: true idCard: range: IdCardDetailsClass multivalued: true - inlined_as_list: true \ No newline at end of file + inlined_as_list: true + sex: + range: SexClass + multivalued: true + inlined_as_list: true + description: A person's legal sex. Only used for matching in certain life events. Multivalued only for consistency with other personal attributes. From f29056e7d2d9a93b38d2e6c08b0e7da3e425276f Mon Sep 17 00:00:00 2001 From: George Lund Date: Fri, 11 Aug 2023 09:47:20 +0100 Subject: [PATCH 02/19] Remove verificationLevel - we don't know what it means and we believe we aren't sent it yet Co-authored-by: Olly Levett --- v1/examples/LifeEventSETClass/death-registration.json | 1 - v1/linkml-schemas/lifeEvents.yaml | 6 +----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/v1/examples/LifeEventSETClass/death-registration.json b/v1/examples/LifeEventSETClass/death-registration.json index 27192df..7c27578 100644 --- a/v1/examples/LifeEventSETClass/death-registration.json +++ b/v1/examples/LifeEventSETClass/death-registration.json @@ -72,7 +72,6 @@ "deathDate": { "value": "1989-07", "description": "Deceased found on 3 August 1989", - "verificationLevel": 3 }, "freeFormatDeathDate": "Unknown due to mortuary error but some time in July 1989" } diff --git a/v1/linkml-schemas/lifeEvents.yaml b/v1/linkml-schemas/lifeEvents.yaml index 7dc31e1..7331941 100644 --- a/v1/linkml-schemas/lifeEvents.yaml +++ b/v1/linkml-schemas/lifeEvents.yaml @@ -56,7 +56,6 @@ classes: range: date slots: - description - - verificationLevel slots: subject: @@ -68,7 +67,4 @@ slots: description: Free format date of death of deceased person. deathRegistrationID: description: Registration ID on the RON system - range: integer - verificationLevel: - range: integer - description: TBC what this really means \ No newline at end of file + range: integer \ No newline at end of file From a55ee47dea582aee01d0ce2a24e161e9e9f7950d Mon Sep 17 00:00:00 2001 From: Olly Levett Date: Fri, 11 Aug 2023 10:52:49 +0100 Subject: [PATCH 03/19] add custom date structure for death date --- v1/examples/LifeEventSETClass/death-registration.json | 2 +- v1/linkml-schemas/lifeEvents.yaml | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/v1/examples/LifeEventSETClass/death-registration.json b/v1/examples/LifeEventSETClass/death-registration.json index 7c27578..51bc6e6 100644 --- a/v1/examples/LifeEventSETClass/death-registration.json +++ b/v1/examples/LifeEventSETClass/death-registration.json @@ -71,7 +71,7 @@ "deathRegistrationID": 123456, "deathDate": { "value": "1989-07", - "description": "Deceased found on 3 August 1989", + "description": "Deceased found on 3 August 1989" }, "freeFormatDeathDate": "Unknown due to mortuary error but some time in July 1989" } diff --git a/v1/linkml-schemas/lifeEvents.yaml b/v1/linkml-schemas/lifeEvents.yaml index 7331941..289bdb8 100644 --- a/v1/linkml-schemas/lifeEvents.yaml +++ b/v1/linkml-schemas/lifeEvents.yaml @@ -17,6 +17,12 @@ default_curi_maps: default_prefix: di_vocab default_range: string +types: + isoDate: + base: string + uri: xsd:string + pattern: "\\d{4}(?:-\\d{2}(?:-\\d{2})?)?" + classes: DeathRegistrationSETClass: is_a: SETClass @@ -53,7 +59,7 @@ classes: - ValidityClass attributes: value: - range: date + range: isoDate slots: - description From f8ed1a3982c678dceca70561a81b7e514c55c45b Mon Sep 17 00:00:00 2001 From: George Lund Date: Mon, 14 Aug 2023 11:37:13 +0100 Subject: [PATCH 04/19] Add death registration date - we think `toe` "time of event" may not always relate to registration date, once LEN exists Co-authored-by: cmiddi <113512558+cmiddi@users.noreply.github.com> --- .../LifeEventSETClass/death-registration.json | 5 ++++- v1/linkml-schemas/lifeEvents.yaml | 15 +++++++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/v1/examples/LifeEventSETClass/death-registration.json b/v1/examples/LifeEventSETClass/death-registration.json index 51bc6e6..160e570 100644 --- a/v1/examples/LifeEventSETClass/death-registration.json +++ b/v1/examples/LifeEventSETClass/death-registration.json @@ -73,7 +73,10 @@ "value": "1989-07", "description": "Deceased found on 3 August 1989" }, - "freeFormatDeathDate": "Unknown due to mortuary error but some time in July 1989" + "freeFormatDeathDate": "Unknown due to mortuary error but some time in July 1989", + "deathRegistrationDate": { + "value": "1989-08-10" + } } } } diff --git a/v1/linkml-schemas/lifeEvents.yaml b/v1/linkml-schemas/lifeEvents.yaml index 289bdb8..b9e8ed9 100644 --- a/v1/linkml-schemas/lifeEvents.yaml +++ b/v1/linkml-schemas/lifeEvents.yaml @@ -54,6 +54,7 @@ classes: - subject - deathDate - freeFormatDeathDate + - deathRegistrationDate DeathDateClass: mixins: - ValidityClass @@ -62,7 +63,13 @@ classes: range: isoDate slots: - description - + DeathRegistrationDateClass: + mixins: + - ValidityClass + attributes: + value: + range: date + slots: subject: range: PersonClass @@ -73,4 +80,8 @@ slots: description: Free format date of death of deceased person. deathRegistrationID: description: Registration ID on the RON system - range: integer \ No newline at end of file + range: integer + deathRegistrationDate: + description: Date the death was registered, may be the same as the date part of the `toe` JWT claim + range: DeathRegistrationDateClass + From 91175f754f6e6e075d544c60828ecab5bbee8dbd Mon Sep 17 00:00:00 2001 From: George Lund Date: Mon, 14 Aug 2023 14:58:10 +0100 Subject: [PATCH 05/19] Life events don't need validity dates - data in events is generally assumed to be true at the time - this is unlike data relating directly to subjects, where values that were previously correct may be useful for matching purposes --- v1/linkml-schemas/lifeEvents.yaml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/v1/linkml-schemas/lifeEvents.yaml b/v1/linkml-schemas/lifeEvents.yaml index b9e8ed9..08afa66 100644 --- a/v1/linkml-schemas/lifeEvents.yaml +++ b/v1/linkml-schemas/lifeEvents.yaml @@ -56,16 +56,12 @@ classes: - freeFormatDeathDate - deathRegistrationDate DeathDateClass: - mixins: - - ValidityClass attributes: value: range: isoDate slots: - description DeathRegistrationDateClass: - mixins: - - ValidityClass attributes: value: range: date From 9c8b647b46497992593926ff1e13b4b9e32dde25 Mon Sep 17 00:00:00 2001 From: George Lund Date: Mon, 14 Aug 2023 16:38:23 +0100 Subject: [PATCH 06/19] Rename 'SET' classes to 'JWT' for life events - that they look like SETs is irrelevant and potentially confusing - to a consumer they are JWTs - also rename example directory which was named after a class that never in fact existed --- scripts/generate_json_schemas.sh | 4 ++-- scripts/test | 2 +- .../death-registration.json | 0 v1/linkml-schemas/lifeEvents.yaml | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) rename v1/examples/{LifeEventSETClass => life-events}/death-registration.json (100%) diff --git a/scripts/generate_json_schemas.sh b/scripts/generate_json_schemas.sh index 0774520..8623d08 100644 --- a/scripts/generate_json_schemas.sh +++ b/scripts/generate_json_schemas.sh @@ -25,8 +25,8 @@ LINKML_ITEMS=( "name.yaml,NameClass,Name.json" "credentials.yaml,IssuerAuthorizationRequestClass,IssuerAuthorizationRequest.json" "credentials.yaml,OpenIDConnectAuthenticationRequestClass,OpenIDConnectAuthenticationRequest.json" - "lifeEvents.yaml,DeathRegistrationSETClass,DeathRegistrationSET.json", - "lifeEvents.yaml,DeathRegistrationUpdateSETClass,DeathRegistrationUpdateSET.json" + "lifeEvents.yaml,DeathRegistrationJWTClass,DeathRegistrationJWT.json", + "lifeEvents.yaml,DeathRegistrationUpdateJWTClass,DeathRegistrationUpdateJWT.json" ) ROOT_DIR="$( git rev-parse --show-toplevel )" diff --git a/scripts/test b/scripts/test index 9f954a1..a2f0019 100755 --- a/scripts/test +++ b/scripts/test @@ -9,4 +9,4 @@ ajv validate -c ajv-formats -s $HERE/../v1/json-schemas/IdentityCheckCredentialJ ajv validate -c ajv-formats -s $HERE/../v1/json-schemas/IdentityCheckCredentialJWT.json -d $HERE/../v1/examples/identity-check-jwt.json ajv validate -c ajv-formats -s $HERE/../v1/json-schemas/IssuerAuthorizationRequest.json -d $HERE/../v1/examples/core-cri-authz-request.json ajv validate -c ajv-formats -s $HERE/../v1/json-schemas/OpenIDConnectAuthenticationRequest.json -d $HERE/../v1/examples/rp-authz-request.json -ajv validate -c ajv-formats -s $HERE/../v1/json-schemas/DeathRegistrationSET.json -d $HERE/../v1/examples/LifeEventSETClass/death-registration.json +ajv validate -c ajv-formats -s $HERE/../v1/json-schemas/DeathRegistrationJWT.json -d $HERE/../v1/examples/life-events/death-registration.json diff --git a/v1/examples/LifeEventSETClass/death-registration.json b/v1/examples/life-events/death-registration.json similarity index 100% rename from v1/examples/LifeEventSETClass/death-registration.json rename to v1/examples/life-events/death-registration.json diff --git a/v1/linkml-schemas/lifeEvents.yaml b/v1/linkml-schemas/lifeEvents.yaml index 08afa66..78ac9bc 100644 --- a/v1/linkml-schemas/lifeEvents.yaml +++ b/v1/linkml-schemas/lifeEvents.yaml @@ -24,7 +24,7 @@ types: pattern: "\\d{4}(?:-\\d{2}(?:-\\d{2})?)?" classes: - DeathRegistrationSETClass: + DeathRegistrationJWTClass: is_a: SETClass attributes: events: @@ -36,7 +36,7 @@ classes: range: DeathRegistrationEventClass required: true alias: "https://ssf.account.gov.uk/v1/deathRegistration" - DeathRegistrationUpdateSETClass: + DeathRegistrationUpdateJWTClass: is_a: SETClass attributes: events: From 303bf3bdfc959cdeaf2d8aab6d7c74ffaa093346 Mon Sep 17 00:00:00 2001 From: George Lund Date: Mon, 14 Aug 2023 16:40:57 +0100 Subject: [PATCH 07/19] Makes more sense if `toe` matches the purported registration date --- v1/examples/life-events/death-registration.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v1/examples/life-events/death-registration.json b/v1/examples/life-events/death-registration.json index 160e570..07f54f0 100644 --- a/v1/examples/life-events/death-registration.json +++ b/v1/examples/life-events/death-registration.json @@ -2,7 +2,7 @@ "iss": "https://scim.example.com", "iat": 1691637001, "jti": "4d3559ec67504aaba65d40b0363faad8", - "toe": 1691637178, + "toe": 618706800, "events": { "https://ssf.account.gov.uk/v1/deathRegistration": { "subject": { From 22f76d4e97909cf8e8fcaa988326252f856326f6 Mon Sep 17 00:00:00 2001 From: George Lund Date: Mon, 14 Aug 2023 16:43:33 +0100 Subject: [PATCH 08/19] Add missing transaction reference core claim - we aren't sure yet how it might be used for life events --- v1/linkml-schemas/events.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/v1/linkml-schemas/events.yaml b/v1/linkml-schemas/events.yaml index 76d9804..b96747c 100644 --- a/v1/linkml-schemas/events.yaml +++ b/v1/linkml-schemas/events.yaml @@ -21,8 +21,11 @@ classes: is_a: JWTClass slots: - toe + - txn slots: toe: range: integer description: A value that represents the date and time at which the event occurred. This value is a NumericDate (see Section 2 of RFC7519). + txn: + description: An optional string value that represents a unique transaction identifier. From f04e7f39dc886ea96f3e6840067e2354819f5300 Mon Sep 17 00:00:00 2001 From: George Lund Date: Tue, 15 Aug 2023 15:36:54 +0100 Subject: [PATCH 09/19] Refactor so that life events schemas don't include references to documents - we don't want all references to people to have to include schemas about documents - therefore move the links to documents into the "documents" schema, and adjust the "Person" class hierarchy accordingly - this seemed to be more or less the smallest change that would result in a smaller JSON schema for death notification events - the generated JSON Schema file for a death registration even is now ~30% smaller --- v1/linkml-schemas/credentials.yaml | 19 ++++-- v1/linkml-schemas/document.yaml | 30 ++++++++++ .../identityCheckCredential.yaml | 9 +++ v1/linkml-schemas/lifeEvents.yaml | 6 +- v1/linkml-schemas/person.yaml | 60 +++++-------------- .../verifiableIdentityCredential.yaml | 3 +- 6 files changed, 74 insertions(+), 53 deletions(-) diff --git a/v1/linkml-schemas/credentials.yaml b/v1/linkml-schemas/credentials.yaml index 79e682a..b683965 100644 --- a/v1/linkml-schemas/credentials.yaml +++ b/v1/linkml-schemas/credentials.yaml @@ -89,8 +89,9 @@ classes: type: range: VerifiableCredentialType multivalued: true + slot_usage: credentialSubject: - range: PersonIdentityClass + range: PersonWithIdentityClass AddressCredentialClass: is_a: VerifiableCredentialClass @@ -98,8 +99,17 @@ classes: type: range: VerifiableCredentialType multivalued: true + slot_usage: credentialSubject: - range: AddressClass + range: AddressAssertionClass + + CredentialSubjectClass: + description: Verifiable credential subjects use multiple inheritance; this base class is intentionally blank. + see_also: + - /v1/IdentityCheckCredentialClass_credentialSubject + - /v1/AddressCredentialClass_credentialSubject + - /v1/IdentityAssertionCredentialClass_credentialSubject + - /v1/VerifiableIdentityCredentialClass_credentialSubject slots: credentialJWT: @@ -109,9 +119,10 @@ slots: vc: range: VerifiableCredentialClass credentialSubject: - range: PersonClass + slot_uri: https://www.w3.org/2018/credentials#credentialSubject + range: CredentialSubjectClass shared_claims: - range: PersonClass + range: IdentityCheckSubjectClass description: The shared claims. This value will detail what shared information the calling service wants to and is permitted to share. response_type: range: string diff --git a/v1/linkml-schemas/document.yaml b/v1/linkml-schemas/document.yaml index c82260e..69d691e 100644 --- a/v1/linkml-schemas/document.yaml +++ b/v1/linkml-schemas/document.yaml @@ -9,12 +9,22 @@ prefixes: imports: - linkml:types - ./common + - ./person default_curi_maps: - semweb_context default_prefix: di_vocab default_range: string classes: + PersonWithDocumentsClass: + is_a: PersonWithIdentityClass + slots: + - passport + - drivingPermit + - residencePermit + - socialSecurityRecord + - idCard + DocumentDetailsClass: mixins: - ValidityClass @@ -121,6 +131,26 @@ classes: - documentNumber - icaoIssuerCode slots: + passport: + range: PassportDetailsClass + multivalued: true + inlined_as_list: true + drivingPermit: + range: DrivingPermitDetailsClass + multivalued: true + inlined_as_list: true + residencePermit: + range: ResidencePermitDetailsClass + multivalued: true + inlined_as_list: true + socialSecurityRecord: + range: SocialSecurityRecordDetailsClass + multivalued: true + inlined_as_list: true + idCard: + range: IdCardDetailsClass + multivalued: true + inlined_as_list: true documentNumber: description: An identifier generated for the specific document when it was issued, for example the passport number. required: true diff --git a/v1/linkml-schemas/identityCheckCredential.yaml b/v1/linkml-schemas/identityCheckCredential.yaml index 446a12d..2779103 100644 --- a/v1/linkml-schemas/identityCheckCredential.yaml +++ b/v1/linkml-schemas/identityCheckCredential.yaml @@ -9,12 +9,18 @@ prefixes: imports: - ./evidence - ./credentials + - ./person + - ./document default_curi_maps: - semweb_context default_prefix: di_vocab default_range: string classes: + IdentityCheckSubjectClass: + is_a: PersonWithDocumentsClass + slots: + - address IdentityCheckCredentialClass: is_a: VerifiableCredentialClass slots: @@ -23,6 +29,9 @@ classes: type: range: VerifiableCredentialType multivalued: true + slot_usage: + credentialSubject: + range: IdentityCheckSubjectClass slots: evidence: diff --git a/v1/linkml-schemas/lifeEvents.yaml b/v1/linkml-schemas/lifeEvents.yaml index 78ac9bc..34c4637 100644 --- a/v1/linkml-schemas/lifeEvents.yaml +++ b/v1/linkml-schemas/lifeEvents.yaml @@ -49,9 +49,11 @@ classes: required: true alias: "https://ssf.account.gov.uk/v1/deathRegistrationUpdate" DeathRegistrationEventClass: + attributes: + subject: + range: PersonExtendedMatchingClass slots: - deathRegistrationID - - subject - deathDate - freeFormatDeathDate - deathRegistrationDate @@ -67,8 +69,6 @@ classes: range: date slots: - subject: - range: PersonClass deathDate: range: DeathDateClass slot_uri: schema:deathDate diff --git a/v1/linkml-schemas/person.yaml b/v1/linkml-schemas/person.yaml index f4f0597..2839f0f 100644 --- a/v1/linkml-schemas/person.yaml +++ b/v1/linkml-schemas/person.yaml @@ -1,44 +1,41 @@ id: https://vocab.account.gov.uk/linkml/person-schema name: person-schema -title: Name -description: >- - A real name for a user, composed of an ordered list of given names and family names (etc) prefixes: linkml: https://w3id.org/linkml/ di_vocab: https://vocab.account.gov.uk/v1/ imports: - linkml:types + - ./common - ./name - ./address - - ./document default_curi_maps: - semweb_context default_prefix: di_vocab default_range: string classes: - CredentialSubjectClass: - PersonClass: - mixins: - - PersonIdentityClass - is_a: CredentialSubjectClass class_uri: schema:Person - slots: - - address - - passport - - drivingPermit - - residencePermit - - socialSecurityRecord - - idCard - - sex - PersonIdentityClass: - is_a: CredentialSubjectClass + PersonWithIdentityClass: + description: A credential subject representing a person only by core identity attributes + is_a: PersonClass slots: - name - birthDate + PersonExtendedMatchingClass: + description: An extended version of the PersonIdentity class for situations like Life Events where additional data may be required for matching, but where the full range of documents is not required + is_a: PersonWithIdentityClass + slots: + - sex + - address + + AddressAssertionClass: + is_a: PersonClass + slots: + - address + BirthDateClass: mixins: - ValidityClass @@ -52,11 +49,6 @@ classes: slots: - value - AddressClass: - is_a: CredentialSubjectClass - slots: - - address - slots: name: range: NameClass @@ -71,26 +63,6 @@ slots: range: PostalAddressClass multivalued: true inlined_as_list: true - passport: - range: PassportDetailsClass - multivalued: true - inlined_as_list: true - drivingPermit: - range: DrivingPermitDetailsClass - multivalued: true - inlined_as_list: true - residencePermit: - range: ResidencePermitDetailsClass - multivalued: true - inlined_as_list: true - socialSecurityRecord: - range: SocialSecurityRecordDetailsClass - multivalued: true - inlined_as_list: true - idCard: - range: IdCardDetailsClass - multivalued: true - inlined_as_list: true sex: range: SexClass multivalued: true diff --git a/v1/linkml-schemas/verifiableIdentityCredential.yaml b/v1/linkml-schemas/verifiableIdentityCredential.yaml index f2e5bcd..e0b43cd 100644 --- a/v1/linkml-schemas/verifiableIdentityCredential.yaml +++ b/v1/linkml-schemas/verifiableIdentityCredential.yaml @@ -23,5 +23,4 @@ classes: multivalued: true slot_usage: credentialSubject: - range: PersonIdentityClass - + range: PersonWithIdentityClass From 8393d0967ec5bca457200bae4d653fec1bb938fb Mon Sep 17 00:00:00 2001 From: George Lund Date: Tue, 15 Aug 2023 17:04:10 +0100 Subject: [PATCH 10/19] Death registration date was supposed to include a time part --- v1/examples/life-events/death-registration.json | 6 +++--- v1/linkml-schemas/common.yaml | 11 +++++++++++ v1/linkml-schemas/lifeEvents.yaml | 13 ++++--------- 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/v1/examples/life-events/death-registration.json b/v1/examples/life-events/death-registration.json index 07f54f0..f1b1254 100644 --- a/v1/examples/life-events/death-registration.json +++ b/v1/examples/life-events/death-registration.json @@ -2,7 +2,7 @@ "iss": "https://scim.example.com", "iat": 1691637001, "jti": "4d3559ec67504aaba65d40b0363faad8", - "toe": 618706800, + "toe": 618744124, "events": { "https://ssf.account.gov.uk/v1/deathRegistration": { "subject": { @@ -74,8 +74,8 @@ "description": "Deceased found on 3 August 1989" }, "freeFormatDeathDate": "Unknown due to mortuary error but some time in July 1989", - "deathRegistrationDate": { - "value": "1989-08-10" + "deathRegistrationTime": { + "value": "1989-08-10T10:22:04" } } } diff --git a/v1/linkml-schemas/common.yaml b/v1/linkml-schemas/common.yaml index 41c5c41..cdea2e2 100644 --- a/v1/linkml-schemas/common.yaml +++ b/v1/linkml-schemas/common.yaml @@ -27,6 +27,17 @@ classes: - validFrom - validUntil + StructuredAttributeClass: + slots: + - value + + StructuredDateTimeClass: + is_a: StructuredAttributeClass + description: A complete datetime in ISO format with a structure to allow future addition of metadata if required + slot_usage: + value: + range: datetime + types: JWS: uri: "https://www.iana.org/assignments/media-types/application/jose" diff --git a/v1/linkml-schemas/lifeEvents.yaml b/v1/linkml-schemas/lifeEvents.yaml index 34c4637..6bce140 100644 --- a/v1/linkml-schemas/lifeEvents.yaml +++ b/v1/linkml-schemas/lifeEvents.yaml @@ -56,17 +56,13 @@ classes: - deathRegistrationID - deathDate - freeFormatDeathDate - - deathRegistrationDate + - deathRegistrationTime DeathDateClass: attributes: value: range: isoDate slots: - description - DeathRegistrationDateClass: - attributes: - value: - range: date slots: deathDate: @@ -77,7 +73,6 @@ slots: deathRegistrationID: description: Registration ID on the RON system range: integer - deathRegistrationDate: - description: Date the death was registered, may be the same as the date part of the `toe` JWT claim - range: DeathRegistrationDateClass - + deathRegistrationTime: + description: Date/time the death was registered, may be the same as the `toe` JWT claim + range: StructuredDateTimeClass From 1888fc56e93bb0e97249c936465356234968a019 Mon Sep 17 00:00:00 2001 From: George Lund Date: Tue, 15 Aug 2023 17:06:22 +0100 Subject: [PATCH 11/19] Add example of a death registration record update --- scripts/test | 1 + .../death-registration-update.json | 82 +++++++++++++++++++ v1/linkml-schemas/lifeEvents.yaml | 14 +++- 3 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 v1/examples/life-events/death-registration-update.json diff --git a/scripts/test b/scripts/test index a2f0019..43fa4d0 100755 --- a/scripts/test +++ b/scripts/test @@ -10,3 +10,4 @@ ajv validate -c ajv-formats -s $HERE/../v1/json-schemas/IdentityCheckCredentialJ ajv validate -c ajv-formats -s $HERE/../v1/json-schemas/IssuerAuthorizationRequest.json -d $HERE/../v1/examples/core-cri-authz-request.json ajv validate -c ajv-formats -s $HERE/../v1/json-schemas/OpenIDConnectAuthenticationRequest.json -d $HERE/../v1/examples/rp-authz-request.json ajv validate -c ajv-formats -s $HERE/../v1/json-schemas/DeathRegistrationJWT.json -d $HERE/../v1/examples/life-events/death-registration.json +ajv validate -c ajv-formats -s $HERE/../v1/json-schemas/DeathRegistrationUpdateJWT.json -d $HERE/../v1/examples/life-events/death-registration-update.json diff --git a/v1/examples/life-events/death-registration-update.json b/v1/examples/life-events/death-registration-update.json new file mode 100644 index 0000000..b66489b --- /dev/null +++ b/v1/examples/life-events/death-registration-update.json @@ -0,0 +1,82 @@ +{ + "iss": "https://scim.example.com", + "iat": 1691637001, + "jti": "4d3559ec67504aaba65d40b0363faad8", + "toe": 618772150, + "events": { + "https://ssf.account.gov.uk/v1/deathRegistrationUpdate": { + "subject": { + "name": [ + { + "nameParts": [ + { + "value": "Velma", + "type": "GivenName" + }, + { + "value": "Rogers", + "type": "FamilyName" + } + ] + }, + { + "nameParts": [ + { + "value": "Velma", + "type": "GivenName" + }, + { + "value": "Smith", + "type": "FamilyName" + } + ], + "description": "Otherwise or formerly known as" + }, + { + "nameParts": [ + { + "value": "Velma", + "type": "GivenName" + }, + { + "value": "Molone", + "type": "FamilyName" + } + ], + "description": "Name before marriage" + } + ], + "sex": [ + { + "value": "Female" + } + ], + "birthDate": [ + { + "value": "1989-07-06", + "description": "May be incorrect" + } + ], + "address": [ + { + "subBuildingName": "Flat 4", + "buildingNumber": "5", + "streetName": "Mystery Street", + "addressLocality": "Coolsville", + "postalCode": "M15 7", + "addressCountry": "US" + } + ] + }, + "deathRegistrationID": 123456, + "deathDate": { + "value": "1989-07", + "description": "Deceased found on 3 August 1989" + }, + "freeFormatDeathDate": "Unknown due to mortuary error but some time in July 1989", + "recordUpdateTime": { + "value": "1989-08-10T18:09:10" + } + } + } +} diff --git a/v1/linkml-schemas/lifeEvents.yaml b/v1/linkml-schemas/lifeEvents.yaml index 6bce140..78bfece 100644 --- a/v1/linkml-schemas/lifeEvents.yaml +++ b/v1/linkml-schemas/lifeEvents.yaml @@ -45,7 +45,7 @@ classes: DeathRegistrationUpdateEventMappingClass: attributes: "deathRegistrationUpdate": - range: DeathRegistrationEventClass + range: DeathRegistrationUpdateEventClass required: true alias: "https://ssf.account.gov.uk/v1/deathRegistrationUpdate" DeathRegistrationEventClass: @@ -57,6 +57,15 @@ classes: - deathDate - freeFormatDeathDate - deathRegistrationTime + DeathRegistrationUpdateEventClass: + attributes: + subject: + range: PersonExtendedMatchingClass + slots: + - deathRegistrationID + - deathDate + - freeFormatDeathDate + - recordUpdateTime DeathDateClass: attributes: value: @@ -76,3 +85,6 @@ slots: deathRegistrationTime: description: Date/time the death was registered, may be the same as the `toe` JWT claim range: StructuredDateTimeClass + recordUpdateTime: + description: Date/time the record was amended, may be the same as the `toe` JWT claim + range: StructuredDateTimeClass From 79870b5e3cc753753dc7d16fb84937c39c73deea Mon Sep 17 00:00:00 2001 From: Olly Levett Date: Wed, 16 Aug 2023 09:52:29 +0100 Subject: [PATCH 12/19] inline ISODate validation --- v1/linkml-schemas/lifeEvents.yaml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/v1/linkml-schemas/lifeEvents.yaml b/v1/linkml-schemas/lifeEvents.yaml index 78bfece..a6fdeb8 100644 --- a/v1/linkml-schemas/lifeEvents.yaml +++ b/v1/linkml-schemas/lifeEvents.yaml @@ -17,12 +17,6 @@ default_curi_maps: default_prefix: di_vocab default_range: string -types: - isoDate: - base: string - uri: xsd:string - pattern: "\\d{4}(?:-\\d{2}(?:-\\d{2})?)?" - classes: DeathRegistrationJWTClass: is_a: SETClass @@ -69,7 +63,7 @@ classes: DeathDateClass: attributes: value: - range: isoDate + pattern: "\\d{4}(?:-\\d{2}(?:-\\d{2})?)?" slots: - description From b08d69cc598c6a57d27a886913359f8f8d74aa90 Mon Sep 17 00:00:00 2001 From: George Lund Date: Wed, 16 Aug 2023 11:13:17 +0100 Subject: [PATCH 13/19] Move structured ISO (partial) date class into common so that it can be re-used; fix regex - regex was allowing prefixes and postfixes to a valid partial date --- v1/linkml-schemas/common.yaml | 9 +++++++++ v1/linkml-schemas/lifeEvents.yaml | 9 +-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/v1/linkml-schemas/common.yaml b/v1/linkml-schemas/common.yaml index cdea2e2..757080b 100644 --- a/v1/linkml-schemas/common.yaml +++ b/v1/linkml-schemas/common.yaml @@ -38,6 +38,15 @@ classes: value: range: datetime + ISODateClass: + is_a: StructuredAttributeClass + slots: + - description + attributes: + value: + pattern: "^\\d{4}(?:-\\d{2}(?:-\\d{2})?)?$" + range: string + types: JWS: uri: "https://www.iana.org/assignments/media-types/application/jose" diff --git a/v1/linkml-schemas/lifeEvents.yaml b/v1/linkml-schemas/lifeEvents.yaml index a6fdeb8..4e4188f 100644 --- a/v1/linkml-schemas/lifeEvents.yaml +++ b/v1/linkml-schemas/lifeEvents.yaml @@ -60,16 +60,9 @@ classes: - deathDate - freeFormatDeathDate - recordUpdateTime - DeathDateClass: - attributes: - value: - pattern: "\\d{4}(?:-\\d{2}(?:-\\d{2})?)?" - slots: - - description - slots: deathDate: - range: DeathDateClass + range: ISODateClass slot_uri: schema:deathDate freeFormatDeathDate: description: Free format date of death of deceased person. From d5bd820a6b36e435cd23eb4a9e6ffba4c209ea2e Mon Sep 17 00:00:00 2001 From: George Lund Date: Wed, 16 Aug 2023 11:20:11 +0100 Subject: [PATCH 14/19] For life events, we might not know someone's birthday exactly - allow us to capture incomplete (partial) birth dates - this may in fact need to be propagated up as it may apply to eg passport to - TODO --- v1/linkml-schemas/lifeEvents.yaml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/v1/linkml-schemas/lifeEvents.yaml b/v1/linkml-schemas/lifeEvents.yaml index 4e4188f..eec02be 100644 --- a/v1/linkml-schemas/lifeEvents.yaml +++ b/v1/linkml-schemas/lifeEvents.yaml @@ -45,7 +45,7 @@ classes: DeathRegistrationEventClass: attributes: subject: - range: PersonExtendedMatchingClass + range: DeathRegistrationSubject slots: - deathRegistrationID - deathDate @@ -54,12 +54,22 @@ classes: DeathRegistrationUpdateEventClass: attributes: subject: - range: PersonExtendedMatchingClass + range: DeathRegistrationSubject slots: - deathRegistrationID - deathDate - freeFormatDeathDate - recordUpdateTime + + DeathRegistrationSubject: + is_a: PersonExtendedMatchingClass + slot_usage: + birthDate: + range: ISODateClass + slot_uri: schema:birthDate + multivalued: true + inlined_as_list: true + slots: deathDate: range: ISODateClass From 75ee445a95783faf58c751aa1f770a7972e2fd0d Mon Sep 17 00:00:00 2001 From: George Lund Date: Wed, 16 Aug 2023 14:20:15 +0100 Subject: [PATCH 15/19] Add record update reasons for death registration updates - these are currently subject to change as we're checking with the authoritative source --- .../life-events/death-registration-update.json | 3 ++- v1/linkml-schemas/lifeEvents.yaml | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/v1/examples/life-events/death-registration-update.json b/v1/examples/life-events/death-registration-update.json index b66489b..a32d00b 100644 --- a/v1/examples/life-events/death-registration-update.json +++ b/v1/examples/life-events/death-registration-update.json @@ -76,7 +76,8 @@ "freeFormatDeathDate": "Unknown due to mortuary error but some time in July 1989", "recordUpdateTime": { "value": "1989-08-10T18:09:10" - } + }, + "deathRecordUpdateReason": "formal_correction" } } } diff --git a/v1/linkml-schemas/lifeEvents.yaml b/v1/linkml-schemas/lifeEvents.yaml index eec02be..fda793a 100644 --- a/v1/linkml-schemas/lifeEvents.yaml +++ b/v1/linkml-schemas/lifeEvents.yaml @@ -60,6 +60,7 @@ classes: - deathDate - freeFormatDeathDate - recordUpdateTime + - deathRecordUpdateReason DeathRegistrationSubject: is_a: PersonExtendedMatchingClass @@ -85,3 +86,15 @@ slots: recordUpdateTime: description: Date/time the record was amended, may be the same as the `toe` JWT claim range: StructuredDateTimeClass + deathRecordUpdateReason: + description: A code noting the reason for the update to the death record + range: DeathRecordUpdateReasonType + +enums: + DeathRecordUpdateReasonType: + permissible_values: + formal_correction: + quality_assurance: + typographical: + cancelled: + cancellation_removed: From 775e23d45b3b6b8f51b81cd998b6f11abce0df27 Mon Sep 17 00:00:00 2001 From: George Lund Date: Wed, 16 Aug 2023 16:18:17 +0100 Subject: [PATCH 16/19] Rename update reason property per review --- v1/examples/life-events/death-registration-update.json | 2 +- v1/linkml-schemas/lifeEvents.yaml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/v1/examples/life-events/death-registration-update.json b/v1/examples/life-events/death-registration-update.json index a32d00b..c6cb929 100644 --- a/v1/examples/life-events/death-registration-update.json +++ b/v1/examples/life-events/death-registration-update.json @@ -77,7 +77,7 @@ "recordUpdateTime": { "value": "1989-08-10T18:09:10" }, - "deathRecordUpdateReason": "formal_correction" + "deathRegistrationUpdateReason": "formal_correction" } } } diff --git a/v1/linkml-schemas/lifeEvents.yaml b/v1/linkml-schemas/lifeEvents.yaml index fda793a..6df0c0e 100644 --- a/v1/linkml-schemas/lifeEvents.yaml +++ b/v1/linkml-schemas/lifeEvents.yaml @@ -60,7 +60,7 @@ classes: - deathDate - freeFormatDeathDate - recordUpdateTime - - deathRecordUpdateReason + - deathRegistrationUpdateReason DeathRegistrationSubject: is_a: PersonExtendedMatchingClass @@ -86,12 +86,12 @@ slots: recordUpdateTime: description: Date/time the record was amended, may be the same as the `toe` JWT claim range: StructuredDateTimeClass - deathRecordUpdateReason: + deathRegistrationUpdateReason: description: A code noting the reason for the update to the death record - range: DeathRecordUpdateReasonType + range: DeathRegistrationUpdateReasonType enums: - DeathRecordUpdateReasonType: + DeathRegistrationUpdateReasonType: permissible_values: formal_correction: quality_assurance: From 15714296593141c71d1012104738ee73e2644501 Mon Sep 17 00:00:00 2001 From: George Lund Date: Wed, 16 Aug 2023 17:15:10 +0100 Subject: [PATCH 17/19] Fix missing "Class" postfix - consistency with other classes in the vocabulary - this is because of MacOS file name clashes (or, it was originally, we may review) --- v1/linkml-schemas/lifeEvents.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/v1/linkml-schemas/lifeEvents.yaml b/v1/linkml-schemas/lifeEvents.yaml index 6df0c0e..b9a4275 100644 --- a/v1/linkml-schemas/lifeEvents.yaml +++ b/v1/linkml-schemas/lifeEvents.yaml @@ -45,7 +45,7 @@ classes: DeathRegistrationEventClass: attributes: subject: - range: DeathRegistrationSubject + range: DeathRegistrationSubjectClass slots: - deathRegistrationID - deathDate @@ -54,15 +54,14 @@ classes: DeathRegistrationUpdateEventClass: attributes: subject: - range: DeathRegistrationSubject + range: DeathRegistrationSubjectClass slots: - deathRegistrationID - deathDate - freeFormatDeathDate - recordUpdateTime - deathRegistrationUpdateReason - - DeathRegistrationSubject: + DeathRegistrationSubjectClass: is_a: PersonExtendedMatchingClass slot_usage: birthDate: From 7e7bf1e682bb55f80c1c257f86308d38b5bd1a97 Mon Sep 17 00:00:00 2001 From: George Lund Date: Thu, 17 Aug 2023 12:29:16 +0100 Subject: [PATCH 18/19] Fix internal name of property - in fact unused due to alias --- v1/linkml-schemas/lifeEvents.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/v1/linkml-schemas/lifeEvents.yaml b/v1/linkml-schemas/lifeEvents.yaml index b9a4275..b8d8ef3 100644 --- a/v1/linkml-schemas/lifeEvents.yaml +++ b/v1/linkml-schemas/lifeEvents.yaml @@ -26,7 +26,7 @@ classes: required: true DeathRegistrationEventMappingClass: attributes: - "deathRegistrationUpdate": + "deathRegistration": range: DeathRegistrationEventClass required: true alias: "https://ssf.account.gov.uk/v1/deathRegistration" From 57604d6251c1e4fa700377f401ed05d15da2a8aa Mon Sep 17 00:00:00 2001 From: George Lund Date: Fri, 18 Aug 2023 10:51:47 +0100 Subject: [PATCH 19/19] Remove `description` from birthDate as it seems unlikely we'll use it for now --- v1/examples/life-events/death-registration-update.json | 3 +-- v1/examples/life-events/death-registration.json | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/v1/examples/life-events/death-registration-update.json b/v1/examples/life-events/death-registration-update.json index c6cb929..f81f4db 100644 --- a/v1/examples/life-events/death-registration-update.json +++ b/v1/examples/life-events/death-registration-update.json @@ -53,8 +53,7 @@ ], "birthDate": [ { - "value": "1989-07-06", - "description": "May be incorrect" + "value": "1989-07-06" } ], "address": [ diff --git a/v1/examples/life-events/death-registration.json b/v1/examples/life-events/death-registration.json index f1b1254..7f16c35 100644 --- a/v1/examples/life-events/death-registration.json +++ b/v1/examples/life-events/death-registration.json @@ -53,8 +53,7 @@ ], "birthDate": [ { - "value": "1989-07-06", - "description": "May be incorrect" + "value": "1989-07-06" } ], "address": [