Skip to content

Commit

Permalink
warning for gln avn and eprspid constraints warning #257
Browse files Browse the repository at this point in the history
  • Loading branch information
oliveregger committed Nov 22, 2023
1 parent f80efa7 commit 66d3c7f
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion input/fsh/invariants/ahvn13-digit-check.fsh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Invariant: ahvn13-digit-check
Description: "AHVN13 / NAVS13 must pass digit check - https://www.gs1.org/services/how-calculate-check-digit-manually"
Severity: #error
Severity: #warning
Expression: "(((10-(28+(value.substring(3,1).toInteger()*3)+(value.substring(4,1).toInteger()*1)+(value.substring(5,1).toInteger()*3)+(value.substring(6,1).toInteger()*1)+(value.substring(7,1).toInteger()*3)+(value.substring(8,1).toInteger()*1)+(value.substring(9,1).toInteger()*3)+(value.substring(10,1).toInteger()*1)+(value.substring(11,1).toInteger()*3))mod(10))mod(10))=value.substring(12,1).toInteger())"
2 changes: 1 addition & 1 deletion input/fsh/invariants/ahvn13-length.fsh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Invariant: ahvn13-length
Description: "AHVN13 / NAVS13 must be exactly 13 characters long"
Severity: #error
Severity: #warning
Expression: "value.matches('^[0-9]{13}$')"
2 changes: 1 addition & 1 deletion input/fsh/invariants/ahvn13-startswith756.fsh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Invariant: ahvn13-startswith756
Description: "AHVN13 / NAVS13 must start with 756"
Severity: #error
Severity: #warning
Expression: "value.startsWith('756')"
2 changes: 1 addition & 1 deletion input/fsh/invariants/epr-spid-length.fsh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Invariant: epr-spid-length
Description: "EPR-SPID must be exactly 18 characters long"
Severity: #error
Severity: #warning
Expression: "value.matches('^[0-9]{18}$')"
2 changes: 1 addition & 1 deletion input/fsh/invariants/epr-spid-modulus-10.fsh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Invariant: epr-spid-modulus-10
Description: "EPR-SPID must pass the modulus 10 check - https://www.gs1.org/services/how-calculate-check-digit-manually"
Severity: #error
Severity: #warning
Expression: "(((10-((68+(value.substring(8,1).toInteger()*3)+(value.substring(9,1).toInteger()*1)+(value.substring(10,1).toInteger()*3)+(value.substring(11,1).toInteger()*1)+(value.substring(12,1).toInteger()*3)+(value.substring(13,1).toInteger()*1)+(value.substring(14,1).toInteger()*3)+(value.substring(15,1).toInteger()*1)+(value.substring(16,1).toInteger()*3))mod(10)))mod(10))=value.substring(17,1).toInteger())"
2 changes: 1 addition & 1 deletion input/fsh/invariants/epr-spid-startswith76133761.fsh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Invariant: epr-spid-startswith76133761
Description: "EPR-SPID must start with 76133761"
Severity: #error
Severity: #warning
Expression: "value.startsWith('76133761')"
6 changes: 3 additions & 3 deletions input/fsh/invariants/gln.fsh
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Invariant: gln-length
Description: "GLN must be exactly 13 characters long"
Severity: #error
Severity: #warning
Expression: "value.matches('^[0-9]{13}$')"

Invariant: gln-modulus-10
Description: "GLN must pass the modulus 10 check - https://www.gs1.org/services/how-calculate-check-digit-manually"
Severity: #error
Severity: #warning
Expression: "(((10-((value.substring(0,1).toInteger()*1)+(value.substring(1,1).toInteger()*3)+(value.substring(2,1).toInteger()*1)+(value.substring(3,1).toInteger()*3)+(value.substring(4,1).toInteger()*1)+(value.substring(5,1).toInteger()*3)+(value.substring(6,1).toInteger()*1)+(value.substring(7,1).toInteger()*3)+(value.substring(8,1).toInteger()*1)+(value.substring(9,1).toInteger()*3)+(value.substring(10,1).toInteger()*1)+(value.substring(11,1).toInteger()*3))mod(10))mod(10))=value.substring(12,1).toInteger())"

Invariant: gln-startswith76
Description: "GLN must start with 76 for Swiss HCP"
Severity: #error
Severity: #warning
Expression: "value.startsWith('76')"
2 changes: 1 addition & 1 deletion input/fsh/invariants/veka-length.fsh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Invariant: veka-length
Description: "Insurance card number must be exactly 20 characters long"
Severity: #error
Severity: #warning
Expression: "value.matches('^[0-9]{20}$')"
2 changes: 1 addition & 1 deletion input/fsh/invariants/veka-startswith807560.fsh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Invariant: veka-startswith807560
Description: "Insurance card number must start with 807560"
Severity: #error
Severity: #warning
Expression: "value.startsWith('807560')"
2 changes: 1 addition & 1 deletion input/pagecontent/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ All significant changes to this FHIR implementation guide will be documented on
#### Fixed
* [#235](https://github.com/hl7ch/ch-core/issues/235): Fix GLN constraint
* [#247](https://github.com/hl7ch/ch-core/issues/247): Fix constraint text and refactor expression (ch-core-doc-1)

* [#257](https://github.com/hl7ch/ch-core/issues/257): Warning instead of errors for GLN, EPR-SPID, AHVN13 and VEKA datatype profiles

### STU 4 Ballot (2023-06-27)

Expand Down

0 comments on commit 66d3c7f

Please sign in to comment.