Skip to content

Commit

Permalink
Merge pull request #10 from statisticsnorway/XSD_2_2_0_PRE-RELEASE
Browse files Browse the repository at this point in the history
Barnevern: Updated PlanType (codes and test). Added Tiltaksgrunnlag
  • Loading branch information
jonolehagemo authored Jan 20, 2023
2 parents fc30d17 + 79457ee commit 6394302
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
20 changes: 14 additions & 6 deletions kontroller/src/main/resources/Individ.xsd
Original file line number Diff line number Diff line change
Expand Up @@ -201,11 +201,14 @@
<xs:attribute name="Plantype" use="required">
<xs:annotation>
<xs:documentation>Kode for plantype:
1 = Tiltaksplan etter § 4-5
2 = Tiltaksplan etter § 4-28
3 = Foreløpig omsorgsplan etter § 4-15, 3. ledd
4 = Omsorgsplan etter § 4-15, 3. ledd
</xs:documentation>
1 = Tiltaksplan etter BVL2021 § 8-1 (tidligere BVL1992 § 4-5)
2 = Tiltaksplan etter BVL2021 § 8-4 (tidligere BVL1992 § 4-28)
3 = Foreløpig omsorgsplan etter BVL1992 § 4-15, 3. ledd. Utgår fra og med 1. januar 2023
4 = Omsorgsplan etter BVL2021 § 8-3, 4. ledd (tidligere BVL1992 § 4-15, 3. ledd)
5 = Tiltaksplan – ettervern etter BVL 2021 § 8-5, 2. ledd
6 = Samværsplan etter BVL 2021 § 7-6
7 = Undersøkelsesplan etter BVL 2021 § 2-2, 3. ledd
8 = Undersøkelsesplan etter akuttvedtak etter BVL 2021 § 8-2, 3. ledd</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
Expand All @@ -215,6 +218,10 @@
<xs:enumeration value="2"/>
<xs:enumeration value="3"/>
<xs:enumeration value="4"/>
<xs:enumeration value="5"/>
<xs:enumeration value="6"/>
<xs:enumeration value="7"/>
<xs:enumeration value="8"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
Expand Down Expand Up @@ -255,6 +262,7 @@
<xs:element name="Lovhjemmel" type="LovhjemmelType"/>
<xs:element name="JmfrLovhjemmel" type="LovhjemmelType" minOccurs="0" maxOccurs="3"/>
<xs:element name="Kategori" type="KategoriType"/>
<xs:element name="Tiltaksgrunnlag" type="SaksinnholdType" minOccurs="0" maxOccurs="unbounded"/>
<xs:element name="Opphevelse" type="OpphevelseType" minOccurs="0"/>
</xs:sequence>
<xs:attribute ref="Id" use="required"/>
Expand Down Expand Up @@ -874,4 +882,4 @@
</xs:simpleType>
</xs:attribute>
</xs:complexType>
</xs:schema>
</xs:schema>
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class PlanTypeTest : BehaviorSpec({
"invalid Plantype",
"<Plan Id=\"42\" StartDato=\"2022-11-14\" Plantype=\"42\" />",
"cvc-enumeration-valid: Value '42' is not facet-valid with respect to " +
"enumeration '[1, 2, 3, 4]'. It must be a value from the enumeration."
"enumeration '[1, 2, 3, 4, 5, 6, 7, 8]'. It must be a value from the enumeration."
),
) { description, partialXml, expectedError ->
`when`(description) {
Expand Down

0 comments on commit 6394302

Please sign in to comment.