openownership / lib-cove-bods

Check that your data complies with the Beneficial Ownership Data Standard (BODS) using our install our data review library to analyse files via your command line interface
https://datareview.openownership.org/
Other
1 stars 0 forks source link

CoVE requirements: person identifiers should have correct scheme #48

Closed siwhitehouse closed 1 month ago

siwhitehouse commented 4 years ago

The docs say:

For person statements, the scheme should have the pattern {JURISDICTION}-{TYPE} where JURISDICTION is an ISO 3-digit country code and TYPE is one of PASSPORT, TAXID or IDCARD.

kd-ods commented 3 months ago

Specification for check(s):

Check 1

Check: That scheme value has a single hyphen in it with a string either side of 1 or more characters.

On fail:

On pass:

Check 2

Check: That string preceding hyphen is a valid iso 3166-1 alpha-3 code (officially assigned code elements plus codes used in ISO/IEC 7501-1 for special machine-readable passports):

On fail:

On pass:

Check 3

Check: That the string following the hyphen is one of ‘PASSPORT’, ‘TAXID’ or ‘IDCARD’.

On fail:

kathryn-ods commented 3 months ago

Valid data 1

  {
    "statementId": "019a93f1-e470-42e9-957b-03559861b2e2",
    "declarationSubject": "c359f58d2977",
    "statementDate": "2020-03-04",
    "recordId": "10478c6cf6de",
    "recordType": "person",
    "recordDetails": {
      "isComponent": false,
      "personType": "knownPerson"
    },
    "identifiers":{
      "id": "test",
      "scheme": "GBR-TAXID"
    }
  }
]

Valid data 2


[
  {
    "statementId": "019a93f1-e470-42e9-957b-03559861b2e2",
    "declarationSubject": "c359f58d2977",
    "statementDate": "2020-03-04",
    "recordId": "10478c6cf6de",
    "recordType": "person",
    "recordDetails": {
      "isComponent": false,
      "personType": "knownPerson"
    },
    "identifiers":{
      "id": "test",
      "scheme": "D-PASSPORT"
    }
  }
]
kathryn-ods commented 3 months ago

Check 1 Invalid data 1

  {
    "statementId": "019a93f1-e470-42e9-957b-03559861b2e2",
    "declarationSubject": "c359f58d2977",
    "statementDate": "2020-03-04",
    "recordId": "10478c6cf6de",
    "recordType": "person",
    "recordDetails": {
      "isComponent": false,
      "personType": "knownPerson"
    },
    "identifiers":{
      "id": "test",
      "scheme": "GBR--PASSPORT"
    }
  }
]

Invalid data 2

  {
    "statementId": "019a93f1-e470-42e9-957b-03559861b2e2",
    "declarationSubject": "c359f58d2977",
    "statementDate": "2020-03-04",
    "recordId": "10478c6cf6de",
    "recordType": "person",
    "recordDetails": {
      "isComponent": false,
      "personType": "knownPerson"
    },
    "identifiers":{
      "id": "test",
      "scheme": "GBRPASSPORT"
    }
  }
]

Invalid data 3

[
  {
    "statementId": "019a93f1-e470-42e9-957b-03559861b2e2",
    "declarationSubject": "c359f58d2977",
    "statementDate": "2020-03-04",
    "recordId": "10478c6cf6de",
    "recordType": "person",
    "recordDetails": {
      "isComponent": false,
      "personType": "knownPerson"
    },
    "identifiers":{
      "id": "test",
      "scheme": "-PASSPORT"
    }
  }
]
kathryn-ods commented 3 months ago

Check 2 Invalid data 1

[
  {
    "statementId": "019a93f1-e470-42e9-957b-03559861b2e2",
    "declarationSubject": "c359f58d2977",
    "statementDate": "2020-03-04",
    "recordId": "10478c6cf6de",
    "recordType": "person",
    "recordDetails": {
      "isComponent": false,
      "personType": "knownPerson"
    },
    "identifiers":{
      "id": "test",
      "scheme": "GB-PASSPORT"
    }
  }
]

Invalid data 2

[
  {
    "statementId": "019a93f1-e470-42e9-957b-03559861b2e2",
    "declarationSubject": "c359f58d2977",
    "statementDate": "2020-03-04",
    "recordId": "10478c6cf6de",
    "recordType": "person",
    "recordDetails": {
      "isComponent": false,
      "personType": "knownPerson"
    },
    "identifiers":{
      "id": "test",
      "scheme": "AAA-PASSPORT"
    }
  }
]
kathryn-ods commented 3 months ago

Check 3 Invalid data

[
  {
    "statementId": "019a93f1-e470-42e9-957b-03559861b2e2",
    "declarationSubject": "c359f58d2977",
    "statementDate": "2020-03-04",
    "recordId": "10478c6cf6de",
    "recordType": "person",
    "recordDetails": {
      "isComponent": false,
      "personType": "knownPerson"
    },
    "identifiers":{
      "id": "test",
      "scheme": "GBR-ID"
    }
  }
]
kathryn-ods commented 17 hours ago

noting the invalid data here is formatted incorrectly, identifiers should be nested inside recordDetails and should be an array