Noah 4 Extended Native Format (Nhax and Enhax)
This page is meant for member companies with nhax implementation made prior to the release of the Noah Native Library. Nov 14, 2024
For newer implementations, please see the other subheadings.
IMPORTANT: It is mandatory that a Noah 4 business system support export of Noah data in nhax format.
IMPORTANT:Â Please Notice that Noah from pre 4.12 and again from 4.14 supports UTF-16 when importing. We strongly recommend the use of UTF-8. Please beware that UTF-16 is only supported when importing nhax / enhax; nowhere else is it supported in Noah, e.g., Public and Private blobs, etc.
In 4.12 and 4.13 UTF-16 data can be imported by first importing on a pre-4.12 Noah and then exporting from that version again. Then the data will be in UTF-8 and can be imported on any Noah version.
Â
The Noah 4 Extended Native format (Nhax) is an extension of the older NOAH 3 Native format.
It is not a compatible format, but is based on the same base blob’s and elements (sections).
The SDK contains source code for a Nhax viewer, as well as an xsd file describing the XML of the patient xml data.
The XML sections must have enough information on the encoding to ensure portability.
Enhax is a variation of Nhax, with password protected compression. See description later in this document.
Data Storage
The Noah 4 Native format is a mix of binary data, and compressed XML data, each put into a BLOB section/record:
        The following sections are defined.
              internal enum NHAxFileSections {
                             ROOTSECTION = 0x0201,
                             PATIENTDIRECTORY,
                             USERSECTION,
                             MISCSECTION,
                             PATIENTSECTION
              } ;
The root holds offsets to the other sections. The rootsection is the first section and is at file position 0.
The patient directory holds Patient demographic data as well an offset to the patientsection, for all the exported patients.
The Patient sections each contain the Patient information in XML (These sections are compressed)
The User section contains User information in XML for all the users used in the exported patients.
The Misc section is not used yet. (Future expansion)
ROOT_SECTIONÂ
The ROOT_SECTION begins at File offset 0, and is the entry point to get information.
[StructLayout(LayoutKind.Sequential, Size = (8 + 8 + 8 + 8)), Serializable]
              internal struct RootxSection {
                             [MarshalAsAttribute(UnmanagedType.I8)] internal long MagicNumber; // A magic number for better
identification
                             [MarshalAsAttribute(UnmanagedType.I8)] internal long PatientDirectoryOffset; // File offset to the
Patient directory
                             [MarshalAsAttribute(UnmanagedType.I8)] internal long UserOffset; // File offset to the User section
                             [MarshalAsAttribute(UnmanagedType.I8)] internal long MiscOffset; // File offset to the misc section
              }
 Â
MagicNumber = 0x00AABBCCDD009988;
PATIENTDIRECTORYÂ
The PatientDirectory contains patient information on each patient in the file. The PatientRecordOffset is the file offset to where the PATIENTSECTION resides for the patient. The XML for the patient is the same as for PATIENTSECTION, except that the PatientRecordOffset attribute must be applied and that it only contains that patient’s demographic data. Other sections of the xml (Sessions, PatientModuleSetupData, PatientComments, PatientIdentification ) can/should be omitted.
<?xml version="1.0" encoding="utf-16"?>
<Patients>
 <Patient PatientNo="0000001" PatientGUID="132f2fa8-94a6-4a2d-a6e9-f207599ba41b" CreateDate="2011-02-01T08:17:39" UserInitials="ABC" FirstName="John" LastName="Smith" Gender="0" PatientRecordOffset="40" />
 <Patient PatientNo="0000002" PatientGUID="81A77DDF-5827-467f-BBA8-778CB703EC8C " CreateDate="2011-02-01T09:27:29" UserInitials="ABC" FirstName="John" LastName="Jonson" Gender="0" PatientRecordOffset="1879" />
</Patients>
PATIENTSECTIONÂ
The PATIENTSECTION contains all the information on the patient in XML.
This section contains all the data related to the Patient (Demographic, Sessions, Comments, SetupData, and Identification)
See the NhaxFormat.xsd for further details.
USERSECTIONÂ
Please note that users imported into Noah ES are done so by creating an inactive user.
The USERSECTION contains all the UserInitials for the patients in XML.
<?xml version="1.0" encoding="utf-16"?>
<Users>
 <User>
   <Initials>ABC</Initials>
   <Name>ABC</Name>
   <UserName>ABC</UserName>
 </User>
</Users>
MISCSECTIONÂ
Not used, but available for expansion.
Enhax Format
Enhax is supported in the SDK source code for the Nhax viewer.
Enhax is the same as Nhax, except that it uses password protected compression. It is implemented using SharpZipLib with AESKeySize set to 256, compression level set to 9 (range: 0-9) and compression type is 'Deflated'.