Skip to content

Commit

Permalink
NHA: Update to avlxml version 3
Browse files Browse the repository at this point in the history
Co-authored-by: Jesús García Crespo <[email protected]>
  • Loading branch information
swut and sevein committed Feb 22, 2023
1 parent 41c5b3a commit bd11119
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion internal/nha/activities/hari.go
Original file line number Diff line number Diff line change
Expand Up @@ -277,14 +277,15 @@ func (t avlRequestTime) MarshalJSON() ([]byte, error) {
}

// avlxml is the trimmed version of AVLXML, not including `pasientjournal`.
// Schemas here: https://github.com/arkivverket/schemas/tree/master/AVLXML/.
// Schemas here: https://github.com/norsk-helsearkiv/avlxml/tree/master.
type avlxml struct {
XMLName xml.Name
XSI XmlnsAttr `xml:"xsi,attr"`
SchemaLocation XsiAttr `xml:"schemaLocation,attr"`
Avlxmlversjon string `xml:"avlxmlversjon"`
Avleveringsidentifikator string `xml:"avleveringsidentifikator"`
Avleveringsbeskrivelse string `xml:"avleveringsbeskrivelse"`
Generertdato string `xml:"generertdato"`
Arkivskaper string `xml:"arkivskaper"`
Avtale struct {
InnerXML string `xml:",innerxml"`
Expand Down
2 changes: 1 addition & 1 deletion internal/nha/activities/hari_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func TestHARIActivity(t *testing.T) {

// When slimDown is used.
emptyavlxml := []byte(`<?xml version="1.0" encoding="UTF-8"?>
<avlxml xmlns:xsi="" xsi:schemaLocation=""><avlxmlversjon></avlxmlversjon><avleveringsidentifikator></avleveringsidentifikator><avleveringsbeskrivelse></avleveringsbeskrivelse><arkivskaper></arkivskaper><avtale></avtale></avlxml>`)
<avlxml xmlns:xsi="" xsi:schemaLocation=""><avlxmlversjon></avlxmlversjon><avleveringsidentifikator></avleveringsidentifikator><avleveringsbeskrivelse></avleveringsbeskrivelse><generertdato></generertdato><arkivskaper></arkivskaper><avtale></avtale></avlxml>`)

tests := map[string]struct {
// Activity parameters.
Expand Down

0 comments on commit bd11119

Please sign in to comment.