Helsedir.Hint.Skjemaarkivering.Models
2.1.0-beta.20260311.1
dotnet add package Helsedir.Hint.Skjemaarkivering.Models --version 2.1.0-beta.20260311.1
NuGet\Install-Package Helsedir.Hint.Skjemaarkivering.Models -Version 2.1.0-beta.20260311.1
<PackageReference Include="Helsedir.Hint.Skjemaarkivering.Models" Version="2.1.0-beta.20260311.1" />
<PackageVersion Include="Helsedir.Hint.Skjemaarkivering.Models" Version="2.1.0-beta.20260311.1" />
<PackageReference Include="Helsedir.Hint.Skjemaarkivering.Models" />
paket add Helsedir.Hint.Skjemaarkivering.Models --version 2.1.0-beta.20260311.1
#r "nuget: Helsedir.Hint.Skjemaarkivering.Models, 2.1.0-beta.20260311.1"
#:package Helsedir.Hint.Skjemaarkivering.Models@2.1.0-beta.20260311.1
#addin nuget:?package=Helsedir.Hint.Skjemaarkivering.Models&version=2.1.0-beta.20260311.1&prerelease
#tool nuget:?package=Helsedir.Hint.Skjemaarkivering.Models&version=2.1.0-beta.20260311.1&prerelease
Models for automatic archiving of forms from Altinn 3
Overview
This package is intended for internal use in the Norwegian Directorate of Health. It contains models for handling the DataValues property that is sent together with an Altinn instance. These models are designed to simplify serialization and deserialization of the data values used in Altinn 3 applications so they can easily be archived.
Purpose
The main purpose of this library is to provide a standardized way to work with the DataValues value that is sent with the Altinn instance when submitting a form. It is intended to be distributed as a NuGet package for reuse across multiple projects.
Features
- Strongly-typed models for Altinn 3 form data values.
- Support for JSON serialization and deserialization.
- Compatibility with .NET 8 and .NET 9.
Dependencies
This project has the following dependencies:
- .NET 8 or newer
- System.Text.Json for JSON serialization and deserialization.
Usage
- Add a reference to the NuGet package in your project.
- Import the namespace: Hdir.Hint.Skjemaarkivering.Altinn3.Models
- Use the provided models to handle SkjemaDataValues. For example:
When you want to set values in the DataValues field of the Altinn instance using SkjemaDataValues you can use the following code:
using Hdir.Hint.Skjemaarkivering.Altinn3.Models;
var saksParter = new List<Part>
{
new Part
{
PartIdentifikatorNummer = "12345678901",
PartIdentifikatorType = PartIdentifikatorType.Personnummer,
Skjermet = true
}
};
var korrespondanseparter = new List<Part>
{
new Part
{
PartIdentifikatorNummer = "12345678901",
PartIdentifikatorType = PartIdentifikatorType.Personnummer,
Skjermet = true
}
};
var skjemaDataValues = new SkjemaDataValues
{
SakTittel = "Case title",
Saksparter = saksParter,
JournalpostTittel = "Journal post title",
Korrespondanseparter = korrespondanseparter,
Virksomhet = Virksomhet.Hdir,
FagsystemId = "123456789",
Sone = "Zone",
Arkivspesifikasjon = "
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- No dependencies.
-
net8.0
- No dependencies.
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
2.1.0:
- Added support for .NET 10
- Added support for EksisterendeSak.Saksnummer to be either a P360 saksnummer or a journalpostnummer
2.0.1:
- Added the ability to archive the auto generated form-JSON file from Altinn to the Journalpost in P360.
This can be done by setting the new boolean "ArkiverSkjemaJson" in SkjemaDataValues to true. Default is false.
2.0.0:
- Breaking change: Added length validation for SakTittel (max 254) and JournalpostTittel (max 254) in SkjemaDataValues to comply with P360 requirements.
- Added the ability to inherit ResponsibleUnit and ResponsiblePerosn from the existing case when archiving on an existing case.
This can be done trough the new boolean "JournalpostArvAnsvarligFraSak" in SkjemaDataValues.
- Added the ability to set an alternatiiv "FeilArkivspesifikasjon" that gets used if it is set, and we dont find any exsisting case to archive the form on.
1.4.1:
- Updated to use a shared pipeline for building the package
1.4.0:
- Added the ability to archive a form on an existing case in 360
- Added a new field "eksisterendesak" in SkjemaDataValues to support this (field name kept in Norwegian for backward compatibility)
- Added a new class EksisterendeSak to represent the data required to archive on an existing case
1.3.2:
- Updated constants and added documentation
1.3.0:
- Added ability to set JournalpostStatus in SkjemaDataValues
- Added a JournalpostStatusConst class
- Changed TargetFramework to net8.0