Envelope file format
Envelopes are used to pass data to the LinXmart data linkage system, with specific information that describes what the data is and what LinXmart should do with it.
This Envelope file is also used to pass data back to the user. For example, the results of a probability estimation and the results of a linkage map extraction are both in the format of an Envelope.
The Envelope data file format is a zip file. Within this zip file are three types of files:
- 1 Manifest file
- 1 or more Data files
- 0 or more Metadata files
Manifest
The manifest file is an XML file that contains the information that describes what type of Envelope it is, what it is for, and describes all of the data and metadata files that sit alongside it.
The name of the manifest file must be manifest.xml and basic structure of the manifest file is as follows:
<?xml version="1.0" encoding="utf-8"?>
<Manifest xmlns="http://www.phrn.org.au/participants/cdl/20110801">
<LinkageProject>[linkage project code]</LinkageProject>
<Sender>[data provider code]</Sender>
<RequestType>[data action]</RequestType>
<NumberOfDataFiles>1</NumberOfDataFiles>
<Data>
<File fileName="data.csv" format="FlatFile" datasource="[event type code]" />
</Data>
<Metadata>
<File fileName="sourcefields.csv" description="Source Field Statistics" />
<File fileName="systeminfo.txt" description="System Information and Baseline" />
<File fileName="envelope.json" description="Simple Envelope Definition" />
<File fileName="project.json" description="Project Definition" />
</Metadata>
</Manifest>
The placeholder values in braces ([]) above must reflect the correct values in the system, otherwise the validation of the Envelope will fail. As you can see, an Envelope applies to a single Data Provider, but each data file can apply to a separate Event Type within that Data Provider.
The [data action] can be one of the following values:
| Data Action | Notes |
|---|---|
| SubmitLinkage | The data files are loaded for linkage. All files are loaded before matching and grouping occurs. |
| ProbabilityCalculation | The data files are run through a probability estimation process. |
| Delete | The data files contain record IDs to be deleted. |
| QualityReview | The data files contain update groupings of existing records. |
| ExtractMapping | The data files contain record IDs to extract the linkage map for. This also requires an additional element <ExtractionProjectId> that should contain the system generated ID of the Extraction Project to use for the extraction process. |
Data files
All data files are expected to be in a plain text format. The exact format of these will differ depending on the data action specified and the data sources configured in the system.
Metadata files
The metadata files are not used by the LinXmart application and are more information for the user. They are not required and are only typically created and used by the Simple Envelope Builder.