DHBPrimaryMaternityServiceDataCollectionSystem

MATODS

RetrospectiveFileSpecification

DocumentVersion / 1.3
Date / 25February 2015
Owner / NationalHealthITBoard,SolutionsDeliveryGroup
Status / FINAL

Citation: NationalHealthITBoard.2015.DHBPrimaryMaternityService DataCollection, RetrospectiveFileSpecification.Wellington:Ministryof Health.

Published in2015bytheMinistryofHealth

PO Box5013,Wellington, NewZealand

Thisdocument isavailableon the Ministryof Health’s website:

Tableof Contents

RetrospectiveFile SpecificationsRequirements...... 6

6.InitialInput FileValidation...... 6

6.1.Inputfilenameformat and file attributes...... 6

6.1.1Inputfilenamecode setattributes...... 7

6.1.2Inputfileinitial validationbusiness rules...... 7

6.1.3Inputfile initial validation errormessages...... 8

7.MATSegment Formats,CodeSetsand ValidationRules...... 10

7.1.Extractfile rootsegment...... 10

7.1.1Extractfile rootsegmentdataattributes...... 10

7.1.2Extractfile rootsegmentbusiness rules...... 10

7.1.3Extractfilerootsegmenterrormessages...... 10

7.2.DHBDetailsSegment...... 11

7.2.1DHBDetails segmentdata elements...... 11

7.2.2DHBDetailssegmentcode setelements...... 12

7.2.3DHBDetails segmentbusiness rules...... 12

7.2.4DHBDetails segmenterrormessages...... 13

7.3.Requestsegment...... 14

7.3.1Requestsegmentdataattributes...... 14

7.3.2Requestsegmentbusiness rules...... 14

7.3.3RequestTypesegmenterrormessages...... 14

7.4.WomanIdentitysegment...... 15

7.4.1WomanIdentitysegment dataelements...... 15

7.4.2WomanIdentitysegment business rules...... 16

7.4.3WomanIdentitysegment errormessages...... 16

7.5.Allocation segment...... 18

7.5.1Allocation dataelements...... 18

7.5.2Allocation segment code sets...... 18

7.5.3Allocation segmentbusiness rules...... 18

7.5.4Allocation segment errormessages...... 20

7.6.Antenatalsegment...... 20

7.6.1Antenataldataelements...... 20

7.6.2Antenatalsegment code sets...... 21

7.6.3Antenatalsegment business rules...... 21

7.6.4Antenatalsegment errormessages...... 23

7.7.Labourand Birth segment...... 24

7.7.1Labourand Birth dataelements...... 24

7.7.2LabourandBirthsegment codesets...... 24

7.7.3LabourandBirth segmentbusinessrules...... 24

7.7.4LabourandBirth segmenterror messages...... 25

7.8.Postnatalsegment...... 26

7.8.1Postnataldataelements...... 26

7.8.2Postnatal segment code sets...... 27

7.8.3Postnatalsegmentbusiness rules...... 27

7.8.4Postnatalsegment errormessages...... 28

7.9.BabyDetails segment...... 29

7.9.1BabyDetails segmentdata elements...... 29

7.9.2BabyDetailssegmentbusiness rules...... 29

7.9.3BabyDetails segmenterrormessages...... 30

7.10.BabyIdentitysegment...... 30

7.10.1BabyIdentitysegmentdataelements...... 30

7.10.2BabyIdentitysegmentcodesetelements...... 30

7.10.3BabyIdentitysegmentbusiness rules...... 31

7.10.4BabyIdentitysegmenterrormessages...... 31

7.11.Labourand Birth BabyDetailssegment...... 33

7.11.1LabourandBirthBabyDetailsdataelements...... 33

7.11.2LabourandBirth BabyDetails segmentcodesets...... 33

7.11.3LabourandBirth BabyDetails segmentbusiness rules...... 33

7.11.4LabourandBirth BabyDetails segmenterrormessages...... 34

7.12.PostnatalBabyDetails segment...... 35

7.12.1PostnatalBabyDetailsdataelements...... 35

7.12.2PostnatalBabyDetails segmentcode sets...... 35

7.12.3PostnatalBabyDetailssegment business rules...... 35

7.12.4PostnatalBabyDetailssegmenterrormessages...... 36

7.13.Reversefile rootsegment...... 37

7.13.1Reversefilerootsegmentbusiness rules...... 37

7.13.2Reversefilerootsegmenterrormessages...... 37

7.14.Reversalsegment...... 37

7.14.1Reversaldata elements...... 37

7.14.2Reversalsegmentbusiness rules...... 38

7.14.3Reversalsegment errormessages...... 38

8.MATExtract FileRecordTypes...... 39

8.1.Extractfile recordrequestprocessingrules...... 39

8.2.Extractfilerecordrequestprocessingerrormessages...... 41

9.MATExtract FileReversal...... 43

9.1.Reversefileinitialprocessingrules...... 43

9.2.DHBDetails...... 43

9.3.Extractfilereversalrequest processingrules...... 43

9.4.Extractfilereversalrequest processingerrormessages...... 43

AppendixA–BusinessRulesDiagram...... 45

AppendixB-Level4toLevel2Mapping...... 48

AppendixC:EthnicityDataProtocols...... 49

RetrospectiveFileSpecificationsRequirements

Refer Change Request3541-06ofNovember2012.

6.InitialInputFileValidation

This sectiondescribesthe initialvalidationoftheinputfilewherethefilename,fileversion,conformanceto schemaandauthorisationtoloaddata arechecked.

6.1.Inputfilenameformatandfileattributes

Theformatof theInputfilenameis:

AAAA_MATYYYYMMDD_XXXX_nnn_ZZZZZZ.xml

Where:

  • AAAAdenotesthetargetsystem.
  • ZZZZZZZdenotestheinputfiletype
  • YYYYMMDD is the extractdate
  • XXXXis the submittingDHB code(referto6.1.2 for codeset)
  • nnndenotesasequential number to allowformultipleextracts tooccuron thesameday. For thefirst extract ofthedaythis shouldbe001,forthe second002andsoon.

TheattributesoftheInputfileare listedbelow.

InputFileAttributes
Attribute / Type / Format / M/O/C / Coded
Targetsystem / Code / AAAA / M / Y
Inputfiletype / Code / A(7) / M / Y
Extractdate / Date / YYYY-MM-DD / M / -
SubmittingDHB / Code / NNNN / M / Y
Sequencenumber / PositiveInteger / NNN / M / -
Documentreference / String / AAAA_MATYYYYMMDD_XXXX
_NNN_ZZZZZZZ / M / -
Fileversion / String / NNNNN.NN / M / -

6.1.1Inputfilenamecodeset attributes

TheattributesoftheInputfilename thathavecodedvaluesarelistedbelow.

InputFileNameCodeSet
CodedDataElement / Range / Description
Targetsystem / PRODCOMP / ProductionCompliance
Inputfiletype / EXTRACTREVERSE / ExtractReversal
SubmittingDHB / 1011 / NorthlandDHB
1021 / WaitemataDHB
1022 / AucklandDHB
1023 / CountiesManakauDHB
2031 / WaikatoDHB
2042 / LakesDHB
2047 / BayofPlentyDHB
2051 / TairawhitiDHB
2071 / TaranakiDHB
3061 / HawkesBayDHB
3081 / MidCentralDHB
3082 / WanganuiDHB
3091 / CapitalandCoastDHB
3092 / HuttValleyDHB
3093 / WairarapaDHB
3101 / NelsonMarlboroughDHB
4111 / WestCoastDHB
4121 / CanterburyDHB
4123 / SouthCanterburyDHB
4131 / OtagoDistrictHealthBoard(mergedto4160)
4141 / SouthlandDistrictHealthBoard(mergedto4160)
4160 / SouthernDHB
FileVersion / 00000.01 / Historicfileversion

6.1.2Inputfileinitialvalidation businessrules

Thefollowing businessrules identifythe requirementsfor theinitial validationofMATInputfiles.

BusinessRuleReference / BusinessRuleDescription / AffectedData / ResponseMessageReference
BR-M01-01 /
  • Thefilenamemustcomplywiththeformatidentifiedin6.1above.
/
  • Filenameformat
/ RM-M01-01
BR-M01-02 /
  • Theelementsmustcomplywiththedatacoderangesidentifiedinsection6.1.1above.
/
  • Targetsystem
  • Filetype
  • SubmittingDHB
/ RM-M01-02
RM-M01-12
RM-M01-03
BusinessRuleReference / BusinessRuleDescription / AffectedData / ResponseMessageReference
BR-M01-03 /
  • TheExtractDatemustbelessthanorequaltothedatethefileisreceived.
/
  • ExtractDate
/ RM-M01-04
BR-M01-04 /
  • TheExtractdatemustbegreaterthanorequaltotheExtractdateofthelastfileprocessed.
/
  • ExtractDate
/ RM-M01-05
BR-M01-05 /
  • IfSequencenumberisgreaterthan1,thenSequencenumbermustbeequaltoSequencenumberofthelastacceptedfileonExtractdate+1
/
  • Sequencenumber
/ RM-M01-06
BR-M01-08 /
  • TheSubmittingDHBmustbecertifiedtosubmitthefileversiontotheTargetsystem
/
  • Targetsystem
  • Fileversion
  • SubmittingDHB
/ RM-M01-09
BR-M01-13 /
  • Thefilemustbereadable
(Therootsegmentmustbepresentintheextractfile.)(TheFileversionmustbethepresentintheExtractfile) /
  • File
/ RM-M01-15
BR-M01-16 /
  • Thedataelementsmustbeinthecorrectorder
/  / RM-M01-08
BR-M01-17 /
  • TheTargetsystemintheinputfilenamemustmatchtheprocessingsystem
/
  • Targetsystem
/ RM-M01-19
BR-M01-18 /
  • TheExtractDatemustbeavaliddate
/
  • ExtractDate
/ RM-M01-21
BR-M01-19 /
  • ThefilemustbeinthecorrectDHBinputfolder
/
  • SubmittingDHB
/ RM-M01-20

6.1.3Inputfileinitialvalidation error messages

Thefollowing businessrule responsesapplyto theValidationprocess:

Important Notes:

Responsemessagesareintended toprovide clarityaround conditionswherebusinessrules arenotsuccessfullymet:

1.An ‘Error’isfatal andtheprocesscannotproceeduntil corrected.

2.A ‘Warning’meansunusualconditionsencounteredbut areacceptable.

3.A message is expectedfor eachinstanceof an encounterederrororwarningcondition.

ResponseMessageReference / ErrororWarning / MessageTitle / ResponseMessage
RM-M01-01 / Error / Error–IncorrectDataFormat /
  • TheInputfilenamedoesnotcomplywiththecorrectformat.

RM-M01-02 / Error / Error–IncorrectCodeRange /
  • TheTargetsystemintheInputfilenameisnotwithinthecorrectcoderange.

RM-M01-03 / Error / Error–IncorrectCodeRange /
  • TheSubmittingDHBintheInputfilenameisnotwithinthecorrectcoderange.

RM-M01-04 / Error / Error–InvalidData /
  • TheExtractdateintheInputfileisnotlessthanorequaltothedatethefileisreceivedbyMOH.

RM-M01-05 / Error / Error–InvalidSequence /
  • TheExtractdateintheInputfileisnotgreaterthanorequaltotheExtractdate ofthelastfileprocessedbyMOH.

RM-M01-06 / Error / Error–InvalidSequence /
  • TheSequencenumberintheInputfileisnotgreaterthantheSequencenumberofthelastfileacceptedbyMOH.

RM-M01-08 / Error / Error–XSDValidation /
  • AsystemgeneratedcontextualXSDerrormessageisprovided

RM-M01-09 / Error / Error–InvalidData /
  • TheSubmittingDHBintheInputfilenameisnotcertifiedtosubmitthisfileversiontotheTargetSystem

RM-M01-12 / Error / Error–IncorrectCodeRange /
  • TheInputfiletypeintheInputfilenameisnotwithinthecorrectcoderange.

RM-M01-15 / Error / Error–InvalidData /
  • Thefileisunreadable

RM-M01-19 / Error / Error–InvalidData /
  • InputfilehasbeensubmittedtowrongTargetsystem

RM-M01-20 / Error / Error–InvalidData /
  • TheSubmittingDHBintheinputfilenamedoesnotmatchtheDHBinputfoldername

RM-M01-21 / Error / Error–InvalidData /
  • TheExtractdateintheInputfileisnotavaliddate

7.MATSegmentFormats,CodeSetsandValidationRules

7.1.Extractfilerootsegment

7.1.1Extract file root segment data attributes

TheattributesoftheRootsegment are listedbelow.

TableKey:M=Mandatory.O=Optional.C=Conditional.

RootsegmentAttributes
Attribute / Type / Format / M/O/C / Coded
Documentreference / String / AAAA_MATYYYYMMDD_XXXX
_NNN_ZZZZZZZ / M / -
Fileversion / String / NNNNN.NN / M / -

7.1.2Extract file root segment businessrules

Thefollowing businessrules applyto thedata associatedwiththeValidationprocess.

BusinessRuleReference / BusinessRuleDescription / AffectedData / ResponseMessageReference
BR-M01-09 /
  • TheDocumentreferencemustbepresentintheExtractfile
/
  • Documentreference
/ RM-M01-08
BR-M01-10 /
  • TheDocumentreferencemustbethesameastheFilename
/
  • Documentreference
/ RM-M01-14
BR-M01-15 /
  • TheFileversionmustcomplywiththedataformatidentifiedinsection7.1.1
/
  • Fileversion
/ RM-M01-08

7.1.3Extract file root segment error messages

Thefollowing businessrule responsesapplyto theValidationprocess:

Important Notes:

Responsemessagesareintended toprovide clarityaround conditionswherebusinessrules arenotsuccessfullymet:

1.An ‘Error’isfatal andtheprocesscannotproceeduntil corrected.

2.A ‘Warning’meansunusualconditionsencounteredbut areacceptable.

3.A message is expectedfor eachinstanceof an encounterederrororwarningcondition.

ResponseMessageReference / ErrororWarning / MessageTitle / ResponseMessage
RM-M01-08 / Error / Error–XSDValidation /
  • AsystemgeneratedcontextualXSDerrormessageisprovided

RM-M01-14 / Error / Error–InvalidData /
  • TheDocumentreferenceandthefilenamearenotthesame

7.2.DHB DetailsSegment

7.2.1DHB Details segmentdata elements

The dataelementsofthe DHB Detailssegment are listedbelow.

TableKey:M=Mandatory.O=Optional.C=Conditional.

DHBDetailsElements
DataElement / Type / Format / M/O/C / Coded
DHBofService / Code / NNNN / M / Y
ExtractDateTime / Datetime / YYYY-MM-DDTHH:MM:SS / M / -

7.2.2DHB Details segmentcode setelements

Thedata elementsoftheDHBDetailssegmentthathavecodedvalues arelistedbelow.

DHBDetailsCodeSet
CodedDataElement / Range / Description
DHBofService / 1011 / NorthlandDHB
1021 / WaitemataDHB
1022 / AucklandDHB
1023 / CountiesManakauDHB
2031 / WaikatoDHB
2042 / LakesDHB
2047 / BayofPlentyDHB
2051 / TairawhitiDHB
2071 / TaranakiDHB
3061 / HawkesBayDHB
3081 / MidCentralDHB
3082 / WanganuiDHB
3091 / CapitalandCoastDHB
3092 / HuttValleyDHB
3093 / WairarapaDHB
3101 / NelsonMarlboroughDHB
4111 / WestCoastDHB
4121 / CanterburyDHB
4123 / SouthCanterburyDHB
4131 / OtagoDistrictHealthBoard(mergedto4160)
4141 / SouthlandDistrictHealthBoard(mergedto4160)
4160 / SouthernDHB

7.2.3DHB Details segmentbusinessrules

Thefollowing businessrules applyto thedata associatedwiththeValidationprocess.

BusinessRuleReference / BusinessRuleDescription / AffectedData / ResponseMessageReference
BR-M11-01 /
  • Thesegmentmustcontainallmandatorydataasidentifiedinsection7.2.1above.
/
  • DHBofService
  • ExtractDateTime
/ RM-M01-08
BR-M11-02 /
  • Thedataelementsmustcomplywiththedataformatsidentifiedinsection
7.2.1above. /
  • DHBofService
  • ExtractDateTime
/ RM-M01-08
BR-M11-03 /
  • Thedataelementsmustcomplywiththedatacoderangesidentifiedinsection7.2.2above.
/
  • DHBofService
/ RM-M11-05
BusinessRuleReference / BusinessRuleDescription / AffectedData / ResponseMessageReference
BR-M11-04 /
  • TheExtractDateTimemustequalto
ExtractDateinthefilename /
  • ExtractDateTime
/ RM-M11-06
BR-M11-05 /
  • Thesegmentmustbepresentintheinputfile
/
  • DHBDetails
/ RM-M01-08
BR-M01-06 /
  • TheDHBofServiceinthe DHBDetailssegmentmustmatchtheSubmittingDHBinthefilename.
/
  • DHBofService
  • SubmittingDHB
/ RM-M01-07
BR-M01-14 /
  • TheDHBofServicemustbeactive.
/
  • DHBofService
/ RM-M01-16

7.2.4DHB Details segmenterror messages

Thefollowing businessrule responsesapplyto theValidationprocess:

Important Notes:

Responsemessagesareintended toprovide clarityaround conditionswherebusinessrules arenotsuccessfullymet:

1.An ‘Error’isfatal andtheprocesscannotproceeduntilcorrected.

2.A ‘Warning’meansunusualconditionsencounteredbut areacceptable.

3.A message is expectedfor eachinstanceof an encounterederrororwarning condition.

ResponseMessageReference / ErrororWarning / MessageTitle / ResponseMessage
RM-M01-08 / Error / Error–XSDValidation /
  • AsystemgeneratedcontextualXSDerrormessageisprovided

RM-M11-05 / Error / Error–IncorrectCodeRange /
  • TheDHBofServiceinthe DHBDetailssegmentisnotwithinthecorrectcoderange.

RM-M11-06 / Error / Error–InvalidData /
  • TheExtractDateTimeintheDHBDetailssegmentisnotequaltotheExtractDateinthefilename

RM-M01-07 / Error / Error–InvalidData /
  • TheSubmittingDHBintheInputfilenamedoesnotmatchtheDHBofServiceintheDHBDetailssegment.

RM-M01-16 / Error / Error–InvalidData /
  • TheDHBofServiceinthe DHBDetailssegmentisnotactive

7.3.Requestsegment

7.3.1Request segment dataattributes

TheattributesoftheRequestsegment(whererequesttype is Create, Replace orDelete) are listedbelow.

TableKey:M=Mandatory.O=Optional.C=Conditional.

RequestTypeAttributes
Attribute / Type / Format / M/O/C / Coded
PregnancyIdentifier / Guid / [0-9a-fA-F]{8}-[0-9a-fA-F]{4}-
[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12} / M / -
BatchRequestID / Integer / 9(5) / M / -

7.3.2Request segment businessrules

Thefollowing businessrules applyto thedata associatedwiththeValidationprocess.

BusinessRuleReference / BusinessRuleDescription / AffectedData / ResponseMessageReference
BR-M16-01 /
  • Thesegmentmustcontainallmandatoryattributesasidentifiedinsection7.3.1above.
/
  • PregnancyIdentifier
  • BatchRequestID
/ RM-M01-08
BR-M16-02 /
  • Theattributesmustcomplywiththedataformatsidentifiedinsection
7.3.1above. /
  • PregnancyIdentifier
  • BatchRequestID
/ RM-M01-08
BR-M16-05 /
  • TheBatchRequestIDmustbeuniqueintheExtractFile
/
  • BatchRequestID
/ RM-M01-08
BR-M16-06 /
  • IftherequesttypeisCreateorReplacePregnancyDetailsmustbepresent
/
  • PregnancyDetails
/ RM-M01-08
BR-M16-07 /
  • ThereshouldbeatleastoneCreate,ReplaceorDeleteRequestpresentinthefile
/  / RM-M16-08

7.3.3Request Typesegment error messages

Thefollowing businessrule responsesapplyto theValidationprocess:

Important Notes:

Responsemessagesare intended toprovide clarityaround conditionswherebusinessrules arenotsuccessfullymet:

1.An ‘Error’isfatal andtheprocesscannotproceeduntil corrected.

2.A ‘Warning’meansunusualconditionsencounteredbut areacceptable.

3.A message is expectedforeachinstanceof an encounterederrororwarningcondition.

ResponseMessageReference / ErrororWarning / MessageTitle / ResponseMessage
RM-M01-08 / Error / Error–XSDValidation /
  • AsystemgeneratedcontextualXSDerrormessageisprovided

RM-M16-08 / Error / Error–MissingData /
  • ThefiledoesnotcontainanyCreate, ReplaceorDeleteRequests

7.4.Woman Identitysegment

7.4.1Woman Identitysegmentdata elements

Thedata elementsoftheWomanIdentitysegment arelistedbelow.

TableKey:M=Mandatory.O=Optional.C=Conditional.

WomanIdentityElements
DataElement / Type / Format / M/O/C / Coded
NHINumber / ID / AAANNNN / M / -
DateofBirth / Date / YYYY-MM-DD / M / -
MaternalDeathIndicator / Boolean / ‘true’or‘false’ / M / -

7.4.2Woman Identitysegment businessrules

Thefollowing businessrules applyto thedata associatedwiththeValidationprocess.

BusinessRuleReference / BusinessRuleDescription / AffectedData / ResponseMessageReference
BR-M21-01 /
  • Thesegmentmustcontainallmandatorydataasidentifiedinsection7.4.1above.
/
  • NHI Number
  • DateofBirth
  • MaternalDeathIndicator
/ RM-M01-08
BR-M21-02 /
  • Thedataelementsmustcomplywiththedataformatsidentifiedinsection
7.4.1above. /
  • NHI Number
  • DateofBirth
  • MaternalDeathIndicator
/ RM-M01-08
BR-M21-03 /
  • TheNHINumbermustberegisteredontheNHIdatabasebeforesubmission.
/
  • NHI Number
/ RM-M21-05
BR-M21-04 /
  • TheDateofBirthinthissegmentmustmatchtheDateofBirthheldintheNHIdatabasefortheNHINumber.
/
  • DateofBirth
  • NHI Number
/ RM-M21-06
BR-M21-05 /
  • IftheWomanDetailssegmentissupplied,theWomanIdentitysegmentmustbepresent
/
  • WomanIdentity
/ RM-M01-08
BR-M21-06 /
  • TheSexheldintheNHIdatabasefortheNHINumbermustbe‘F’.
/
  • Sex
  • NHI Number
/ RM-M21-10

7.4.3Woman Identitysegmenterror messages

Thefollowingbusinessrule responsesapplyto theValidationprocess:

Important Notes:

Responsemessagesareintended toprovide clarityaround conditionswherebusinessrules arenotsuccessfullymet:

1.An ‘Error’isfatal andtheprocesscannotproceeduntil corrected.

2.A ‘Warning’meansunusualconditionsencounteredbut areacceptable.

3.A message is expectedfor eachinstanceof an encounterederrororwarningcondition.

ResponseMessageReference / ErrororWarning / MessageTitle / ResponseMessage
RM-M01-08 / Error / Error–XSDValidation /
  • AsystemgeneratedcontextualXSDerrormessageisprovided

RM-M21-05 / Error / Error–InvalidData /
  • TheNHINumbersuppliedintheWomanIdentitysegmentisnotvalidintheNHIDatabase.

RM-M21-06 / Error / Error–InvalidData /
  • TheDateofBirthintheWomanIdentitysegmentdoesnotmatchtheDateofBirthintheNHIDatabasefortheNHINumber.

RM-M21-10 / Error / Error–InvalidData /
  • TheNHINumbersuppliedintheWomanIdentitysegmentisnotregisteredasbelongingtoawoman.

7.5.Allocation segment

7.5.1Allocation data elements

Thedata elementsoftheAllocationSegmentare listedbelow.

TableKey:M=Mandatory.O=Optional.C=Conditional.

AllocationElements
DataElement / Type / Format / M/O/C / Coded / VerifiedAttribute
*
Ethnicity1 / Code / NNNNN / O / Y / -
Ethnicity2 / Code / NNNNN / O / Y / -
Ethnicity3 / Code / NNNNN / O / Y / -
Heightincms / PositiveInteger / NNN / O / - / Y
WeightinKgs / Decimal / NNN.N / O / - / Y
SmokingStatusatAllocation / Boolean / ‘true’or‘false’ / O / - / -
SmokingQuantityatAllocation / Code / A / O / Y / -
Gravida / Integer / NN / O / - / -
Parity / Integer / NN / O / - / -
LMP / Date / YYYY-MM-DD / O / - / -
EDD / Date / YYYY-MM-DD / O / - / -

* The Verified attribute is a booleanindicatorthatthe DHBmayuse toconfirmthatthe value for theelementbeing submitted is legitimatelyoutsidethepermissiblerange.

7.5.2Allocation segment code sets

Thedata elementsoftheAllocationsegmentthathavecodedvalues are listedbelow.

AllocationCodeSet
CodedDataElement / Range / Description
Ethnicity / RefertoAppendixCforthecompletelistofvalidLevel4ethnicitycodesandamappingtableofLevel2codestoLevel4codes
SmokingQuantityatAllocation / L / Lessthan10cigarettesperday
M / 10–20cigarettesperday
H / Morethan20cigarettesperday

7.5.3Allocation segment businessrules

Thefollowing businessrules applyto thedata associatedwiththeValidationprocess.

BusinessRuleReference / BusinessRuleDescription / AffectedData / ResponseMessageReference
BR-M31-02 /
  • Thedataelements,whenpresent,mustcomplywiththedataformatsidentifiedinsection7.5.1above.
/
  • Ethnicity1,2,or3
  • Heightincms
  • WeightinKgs
  • SmokingStatusatAllocation
  • Gravida
  • Parity
  • LMP
  • EDD
  • Verified
/ RM-01-08
BR-M31-03 /
  • Thedataelements,whenpresent,mustcomplywiththedatacoderangesidentifiedinsection7.5.2above.
/
  • Ethnicity1,2or3
  • SmokingQuantityatAllocation
/ RM-M31-16
RM-M01-08
BR-M31-04 / TheAllocationandAntenatalsegmentsmustbesuppliedtogether.Onecannotbesuppliedwithouttheother / Allocation / RM-M31-01
BR-M31-05 /
  • IfnotNULLorverified,Heightincmsmustbeintherange100cm–215cm
/
  • Heightincms
/ RM-M31-19
BR-M31-06 /
  • IfnotNULLorverified,Weightinkgs
mustbeintherange40kg–180kg /
  • WeightinKgs
/ RM-M31-20
BR-M31-07 /
  • IfnotNULL,Gravidamustbebetween1and99
/
  • Gravida
/ RM-M01-08
BR-M31-08 /
  • IfnotNULL,Paritymustbebetween0and99
/
  • Parity
/ RM-M01-08
BR-M31-09 /
  • IfnotNULL,ParitymustbelessthanorequaltoGravida
/
  • Parity
  • Gravida
/ RM-M31-23
BR-M31-10 /
  • IfnotNULL,LMPmustbelessthanorequaltoDateofFirstAntenatalService
/
  • LMP
  • DateofFirstAntenatalService
/ RM-M31-24
BR-M31-11 /
  • EDDmustbegreaterthanorequaltoDateofFirstAntenatalService
/
  • EDD
  • DateofFirstAntenatalService
/ RM-M31-25
BR-M31-12 /
  • EDDmustbelessthanDateofFirstAntenatalService+45weeks
/
  • EDD
  • DateofFirstAntenatalService
/ RM-M31-26
BR-M31-14 /
  • NomorethanthreeEthnicitiesshouldbesupplied.
/
  • Ethnicity
/ RM-M01-08

7.5.4Allocation segment errormessages

Thefollowing businessrule responsesapplyto theValidationprocess:

Important Notes:

Responsemessagesareintended toprovide clarityaround conditionswherebusinessrules arenotsuccessfullymet:

1.An ‘Error’isfatal andtheprocesscannotproceeduntil corrected.

2.A ‘Warning’meansunusualconditionsencounteredbutareacceptable.

3.A message is expectedfor eachinstanceof an encounterederrororwarningcondition.

ResponseMessageReference / ErrororWarning / MessageTitle / ResponseMessage
RM-M01-08 / Error / Error–XSDValidation /
  • AsystemgeneratedcontextualXSDerrormessageisprovided

RM-M31-01 / Error / Error–MissingMandatoryData /
  • TheAllocationandAntenatalsegmentsmust
besuppliedtogether.
RM-M31-16 / Error / Error–IncorrectCodeRange /
  • TheEthnicityintheAllocationsegmentisnotwithinthecorrectcoderange.

RM-M31-19 / Error / Error–ValueNotWithinRange /
  • TheHeightincmsintheAllocationsegmentisnotwithintherangeofprobablevalues.Pleasereviewandconfirmascorrect.

RM-M31-20 / Error / Error–ValueNotWithinRange /
  • TheWeightinKgsintheAllocationsegmentisnotwithintherangeofprobablevalues. Pleasereviewandconfirmascorrect.

RM-M31-21 / Error / Error–Invaliddata /
  • TheGravidain theAllocation segmentisnotwithinthe range of validvalues.

RM-M31-22 / Error / Error–Invaliddata /
  • TheParityin theAllocationsegmentisnotwithinthe range of validvalues.

RM-M31-23 / Error / Error–Invaliddata /
  • TheParityin theAllocationsegmentisnotless thanor equalto the Gravida.

RM-M31-24 / Error / Error–Invaliddata /
  • TheLMPin theAllocation segment isnotlessthanorequaltotheDateofFirstAntenatalService.

RM-M31-25 / Error / Error–Invaliddata /
  • TheEDDin theAllocation segmentisnotgreaterthanorequalto the DateofFirstAntenatalService.

RM-M31-26 / Error / Error–Invaliddata /
  • TheEDDin theAllocation segmentisnotlessthantheDateofFirstAntenatalService+45weeks.

7.6.Antenatalsegment

7.6.1Antenatal data elements

Thedata elementsoftheAntenatalSegmentare listedbelow.

TableKey:M=Mandatory.O=Optional.C=Conditional.

AntenatalElements
DataElement / Type / Format / M/O/C / Coded / Verifiedattribute*
TypeofService / Code / N / M / Y / -
DateofFirstAntenatalService / Date / YYYY-MM-DD / M / - / -
DHBPractitioner / ID / X(10) / O / - / -
AntenatalVisits1stTrimester / Integer / NN / O / - / Y
AntenatalVisits2ndTrimester / Integer / NN / O / - / Y
AntenatalVisits3rdTrimester / Integer / NN / O / - / Y

* The Verified attribute is a booleanindicatorthatthe DHBmayuse toconfirmthatthe value for theelementbeing submitted is legitimatelyoutsidethepermissiblerange.

7.6.2Antenatal segment code sets

Thedata elementsoftheAntenatalsegmentthathavecodedvalues are listedbelow.

AntenatalCodeSet
CodedDataElement / Range / Description
TypeofService / 1 / LMCServicesprovided bya DHBemployed midwife
2 / Co-ordinatedDHB midwiferyservices
3 / DHBmidwiferyservices andpostnatalcare for womanwhohave a medical LMC under theSection88 MaternityServicesNotice

7.6.3Antenatal segment businessrules

Thefollowing businessrules applyto thedata associatedwiththeValidationprocess.

BusinessRuleReference / BusinessRuleDescription / AffectedData / ResponseMessageReference
BR-M41-01 /
  • Thesegmentmustcontainallmandatorydataasidentifiedinsection7.6.1above.
/
  • TypeofService
  • DateofFirstAntenatalService
/ RM-M01-08
BR-M41-02 /
  • Thedataelements,ifpresent,mustcomplywiththedataformatsidentifiedinsection7.6.1above.
/
  • TypeofService
  • DateofFirstAntenatalService
  • AntenatalVisits1sttrimester
  • AntenatalVisits 2ndtrimester
  • AntenatalVisits3rdtrimester
  • Verified
/ RM-M01-08
BR-M41-03 /
  • Thedataelementsmustcomplywiththedatacoderangesidentifiedinsection7.6.2above.
/
  • TypeofService
/ RM-M01-08
BR-M31-04 /
  • TheAllocationandAntenatalsegmentsmustbesuppliedtogether.Onecannotbesuppliedwithouttheother
/
  • Allocation
/ RM-M31-01
BR-M41-04 /
  • TheDateofFirstAntenatalServicemustbelessthanorequaltoExtractDate.
/
  • DateofFirstAntenatalService
  • ExtractDate
/ RM-M41-14
BR-M41-06 /
  • TheDHBPractitionermustberegisteredandtheregistrationdetailsmustbeintheHPIdatabase.
  • ForamidwifetheregistrationnumberistheirfullMidwiferyCouncilofNewZealandRegistrationNumber,includingthehyphen(e.g.15-12345)
  • ForaMedicalProfessionaltheregistrationnumberistheirNewZealandMedicalCouncilNumber
/
  • DHBPractitioner
/ RM-M41-16
BR-M41-07 /
  • Ifnotverified,AntenatalVisits1sttrimestermustbebetween0and10
/
  • AntenatalVisits1sttrimester
/ RM-M41-17
BR-M41-08 /
  • Ifnotverified,AntenatalVisits2ndtrimestermustbebetween0and15
/
  • AntenatalVisits 2ndtrimester
/ RM-M41-18
BR-M41-09 /
  • Ifnotverified,AntenatalVisits3rdtrimestermustbebetween0and30
/
  • AntenatalVisits3rdtrimester
/ RM-M41-19

7.6.4Antenatal segment errormessages

Thefollowing businessrule responsesapplyto theValidationprocess:

Important Notes:

Responsemessagesareintended toprovide clarityaround conditionswherebusinessrules arenotsuccessfullymet:

1.An ‘Error’isfatal andtheprocesscannotproceeduntil corrected.

2.A ‘Warning’meansunusualconditionsencounteredbut areacceptable.

3.A message is expectedfor eachinstanceof an encounterederrororwarningcondition.

ResponseMessageReference / ErrororWarning / MessageTitle / ResponseMessage
RM-M01-08 / Error / Error–XSDValidation /
  • AsystemgeneratedcontextualXSDerrormessageisprovided

RM-M41-14 / Error / Error–InvalidData /
  • TheDateofFirstAntenatalServiceintheAntenatalsegmentisnotlessthanorequaltothedatetheExtractDate.

RM-M41-16 / Error / Error–InvalidData /
  • TheDHBPractitionersuppliedintheAntenatalsegmentisnotvalidintheHPIDatabase.

RM-M41-17 / Error / Error–InvalidData /
  • TheAntenatalVisits1stTrimesterintheAntenatalsegmentisnotintherange0to10.

RM-M41-18 / Error / Error–InvalidData /
  • TheAntenatalVisits2ndTrimesterintheAntenatalsegmentisnotintherange0to15.

RM-M41-19 / Error / Error–InvalidData /
  • TheAntenatalVisits3rdTrimesterintheAntenatalsegmentisnotintherange0to30.

RM-M31-01 / Error / Error–MissingMandatoryData /
  • TheAllocationandAntenatalsegmentsmustbesuppliedtogether..

7.7.Labourand Birthsegment

7.7.1Labour and Birth dataelements

Thedata elementsoftheLabourandBirthSegmentare listedbelow.

TableKey:M=Mandatory.O=Optional.C=Conditional.

LabourandBirthElements
DataElement / Type / Format / M/O/C / Coded
TypeofService / Code / N / M / Y
DeliveryDate / Date / YYYY-MM-DD / M / -
HomeBirthIndicator / Boolean / ‘true’or‘false’ / M / -
VBACIndicator / Boolean / ‘true’or‘false’ / O / -

7.7.2Labour and Birthsegment code sets

Thedata elementsoftheLabourandBirthsegmentthathavecodedvalues are listedbelow.

LabourandBirthCodeSet
CodedDataElement / Range / Description
TypeofService / 1 / LMCServicesprovided bya DHBemployedmidwife
2 / Co-ordinatedDHB midwiferyservices
3 / DHBmidwiferyservices andpostnatalcare for womanwhohave a medical LMC under theSection88 MaternityServicesNotice

7.7.3Labour and Birth segment businessrules

Thefollowing businessrules applyto thedata associated withtheValidationprocess.

BusinessRuleReference / BusinessRuleDescription / AffectedData / ResponseMessageReference
BR-M51-01 /
  • Thesegmentmustcontainallmandatorydataasidentifiedinsection7.7.1above.
/
  • TypeofService
  • DeliveryDate
  • HomeBirthIndicator
/ RM-M01-08
BusinessRuleReference / BusinessRuleDescription / AffectedData / ResponseMessageReference
BR-M51-02 /
  • Thedataelements,whenpresent,mustcomplywiththedataformatsidentifiedinsection7.7.1above.
/
  • TypeofService
  • DeliveryDate
  • HomeBirthIndicator
  • VBACIndicator
/ RM-M01-08
BR-M51-03 /
  • Thedataelementsmustcomplywiththedatacoderangesidentifiedinsection7.7.2above.
/
  • TypeofService
/ RM-M01-08
BR-M51-04 /
  • IfDateofFirstAntenatalServiceissuppliedforthepregnancy,theDeliveryDatemustbegreaterthanorequaltoDateofFirstAntenatalService.
/
  • DeliveryDate
  • DateofFirstAntenatalService
/ RM-M51-14
BR-M51-11 /
  • AtleastoneLabourandBirthBabyDetailssegmentmustbesuppliedwhenthissegmentissupplied.
/
  • LabourandBirthBabyDetails
/ RM-M51-15

7.7.4Labour and Birth segment error messages

Thefollowing businessrule responsesapplyto theValidationprocess:

Important Notes:

Responsemessagesareintended toprovide clarityaround conditionswherebusinessrules arenotsuccessfullymet:

1.An ‘Error’isfatal andtheprocesscannotproceeduntil corrected.

2.A ‘Warning’meansunusualconditionsencounteredbut areacceptable.

3.A message is expectedfor eachinstanceof an encounterederrororwarningcondition.

ResponseMessageReference / ErrororWarning / MessageTitle / ResponseMessage
RM-M01-08 / Error / Error–XSDValidation /
  • AsystemgeneratedcontextualXSDerrormessageisprovided

RM-M51-14 / Error / Error–InvalidData /
  • TheDeliveryDateintheLabourandBirthsegmentisnotgreaterthanorequaltoDateofFirstAntenatalService.

RM-M51-15 / Error / Error–MissingConditionalData /
  • LabourandBirthBabyDetailssegmenthasnotbeensupplied.

7.8.Postnatal segment

7.8.1Postnatal dataelements

Thedata elementsofthePostnatalSegmentare listedbelow.

TableKey:M=Mandatory.O=Optional.C=Conditional.

PostnatalElements
DataElement / Type / Format / M/O/C / Coded / Verifiedattribute*
TypeofService / Code / N / M / Y / -
DateofLastPostnatalService / Date / YYYY-MM-DD / M / - / -
SmokingStatusat2Weeks / Boolean / ‘true’or‘false’ / O / - / -
SmokingQuantityat2Weeks / Code / A / O / Y / -
PostnatalInpatientVisits / Integer / NN / O / Y / Y
PostnatalHomeVisits / Integer / NN / O / Y / Y
DHBPractitioner / ID / X(10) / O / - / -
GPReferral / Code / A / O / Y / -
WellchildReferral / Code / A / O / Y / -

* The Verified attribute is a booleanindicatorthatthe DHBmayuse toconfirmthatthe value for theelementbeing submitted is legitimatelyoutsidethepermissiblerange.

7.8.2Postnatal segment code sets

Thedata elementsofthePostnatalsegmentthathavecodedvaluesare listedbelow.

PostnatalCodeSet
CodedDataElement / Range / Description
TypeofService / 1 / LMCServicesprovided bya DHBemployedmidwife
2 / Co-ordinatedDHB midwiferyservices
3 / DHBmidwiferyservices andpostnatalcare for womanwhohave a medical LMC under theSection88 MaternityServices Notice
SmokingQuantityat2Weeks / L / Lessthan10cigarettesperday
M / 10–20cigarettesperday
H / Morethan20cigarettesperday
GPReferral / Y / Yes
D / DeclinedReferral
WellchildReferral / P / Plunket
O / Other
D / DeclinedReferral

7.8.3Postnatal segment businessrules

Thefollowing businessrules applyto thedata associatedwiththeValidationprocess.

BusinessRuleReference / BusinessRuleDescription / AffectedData / ResponseMessageReference
BR-M71-01 /
  • Thesegmentmustcontainallmandatorydataasidentifiedinsection7.8.1above.
/
  • TypeofService
  • DateofLastPostnatalService
/ RM-M01-08
BR-M71-02 /
  • Thedataelementsmustcomplywiththedataformatsidentifiedinsection
7.8.1above. /
  • TypeofService
  • DateofLastPostnatalService
  • SmokingStatusat2Weeks
  • PostnatalInpatientVisits
  • PostnatalHomeVisits
  • Verified
/ RM-M01-08
BusinessRuleReference / BusinessRuleDescription / AffectedData / ResponseMessageReference
BR-M71-03 /
  • Thedataelementsmustcomplywiththedatacoderangesidentifiedinsection7.8.2above.
/
  • TypeofService
  • SmokingQuantityat2Weeks
  • GPReferral
  • WellchildReferral
/ RM-M01-08
BR-M71-04 /
  • TheDateofLastPostnatalServicemustbegreaterthanorequaltoBabyDateofBirth.
/
  • DateofLastPostnatalService
  • BabyDateofBirth1
/ RM-M71-19
BR-M71-06 /
  • Ifnotverified,PostnatalInpatientVisitsmustbeintherange0–14
/
  • PostnatalInpatientVisits
/ RM-M71-21
BR-M71-07 /
  • Ifnotverified,PostnatalHomeVisits
mustbeintherange0 –30 /
  • PostnatalHomeVisits
/ RM-M71-22
BR-M71-08 /
  • ThesegmentmustcontainDHBPractitionerifTypeofService=1or2.
/
  • DHBPractitioner
  • TypeofService
/ RM-M71-23
BR-M71-09 /
  • TheDHBPractitionermustberegisteredandtheregistrationdetailsmustbeintheHPIdatabase.
  • ForamidwifetheregistrationnumberistheirfullMidwiferyCouncilofNewZealandRegistrationNumber,includingthehyphen(e.g.15-12345).
  • ForaMedicalProfessionaltheregistrationnumberistheirNewZealandMedicalCouncilNumber.
/
  • DHBPractitioner
/ RM-M71-24

7.8.4Postnatal segment errormessages

Thefollowing businessrule responsesapplyto theValidationprocess:

ImportantNotes:

Responsemessagesareintended toprovide clarityaround conditionswherebusinessrules arenotsuccessfullymet:

1.An ‘Error’isfatal andtheprocesscannotproceeduntil corrected.

2.A ‘Warning’meansunusualconditionsencounteredbut areacceptable.

3.A message is expectedfor eachinstanceof an encounterederrororwarningcondition.

1DateofBirthforBaby1ifmultiplebirth

ResponseMessageReference / ErrororWarning / MessageTitle / ResponseMessage
RM-M01-08 / Error / Error–XSDValidation /
  • AsystemgeneratedcontextualXSDerrormessageisprovided

RM-M71-19 / Error / Error–InvalidData /
  • TheDateofLastPostnatalServiceinthePostnatalsegmentisnotgreaterthanorequaltotheDateofBirth.

RM-M71-21 / Error / Error–ValueNotWithinRange /
  • ThePostnatalInpatientVisitsinthePostnatalsegmentisnotwithintherangeofprobablevalues0-14.Pleasereviewandconfirmascorrect.

RM-M71-22 / Error / Error–ValueNotWithinRange /
  • ThePostnatalHomeVisitsinthePostnatalsegmentisnotwithintherangeofprobablevalues0-30.Pleasereviewandconfirmascorrect.

RM-M71-23 / Error / Error–MissingConditionalData /
  • TheDHBPractitionerfieldhasnotbeensuppliedinthePostnatalsegment.Itmustbesupplied whenTypeofService=1or2

RM-M71-24 / Error / Error–InvalidData /
  • TheDHBPractitionersuppliedinthePostnatalsegmentisnotvalidintheHPIDatabase.

7.9.BabyDetailssegment

7.9.1BabyDetails segment data elements

TheattributeoftheBabyDetails segment is listedbelow.

TableKey:M=Mandatory.O=Optional.C=Conditional.

BabyDetailsAttributes
Attribute / Type / Format / M/O/C / Coded
BabyNumber / PositiveInteger / 99 / M / -

7.9.2BabyDetails segment businessrules

Thefollowing businessrules applyto thedata associatedwiththeValidationprocess.

BusinessRuleReference / BusinessRuleDescription / AffectedData / ResponseMessageReference
BR-M86-01 /
  • Thesegmentmustcontaintheattributeasidentifiedinsection7.9.1above
/
  • BabyNumber
/ RM-M01-08
BR-M86-02 /
  • Theattributemustcomplywiththedataformatsidentifiedinsection
7.9.1above. /
  • BabyNumber
/ RM-M01-08
BR-M86-03 /
  • TheBabyNumbermustbeuniqueinthePregnancyDetailssegment.
/
  • BabyNumber
/ RM-M86-03

7.9.3BabyDetails segment error messages

Thefollowing businessrule responsesapplyto theValidationprocess:

Important Notes:

Responsemessagesareintended toprovide clarityaround conditionswherebusinessrules arenotsuccessfullymet:

1.An ‘Error’isfatal andtheprocesscannotproceeduntil corrected.

2.A ‘Warning’meansunusualconditionsencounteredbutareacceptable.

3.A message is expectedfor eachinstanceof an encounterederrororwarningcondition.

ResponseMessageReference / ErrororWarning / MessageTitle / ResponseMessage
RM-M86-01 / Error / Error–MissingMandatoryData /
  • TheBabyNumberattributehasnotbeensuppliedintheBabyDetailssegment.

RM-M86-03 / Error / Error–InvalidData /
  • TheBabyNumbersuppliedintheBabyDetailssegmentisnotuniqueinthePregnancyDetailssegment

7.10.BabyIdentitysegment

7.10.1BabyIdentitysegmentdata elements

Thedata elementsoftheBabyIdentitysegmentare listedbelow. Theyare validatedagainsttheNationalHealthIndex(NHI)database.

TableKey:M=Mandatory.O=Optional.C=Conditional.

BabyIdentityElements
DataElement / Type / Format / M/O/C / Coded
NHINumber / ID / AAANNNN / C / -
DateofBirth / Date / YYYY-MM-DD / C / -
Sex / Code / A / C / Yes

7.10.2BabyIdentitysegmentcode setelements

Thedata elementsoftheBabyIdentitySegmentthathavecodedvalues are listedbelow.

CodedDataElement / Range / Description
Sex / M / Male
F / Female
U / Unknown
I / Indeterminate

7.10.3BabyIdentitysegmentbusinessrules

Thefollowing businessrules applyto thedata associatedwiththeValidationprocess.

BusinessRuleReference / BusinessRuleDescription / AffectedData / ResponseMessageReference
BR-M91-01 /
  • Thesegmentmustcontainallthedataelementsasidentifiedinsection
7.10.1aboveifBirthconditionissuppliedforthepregnancyandBirthcondition=‘LB’.. /
  • NHI Number
  • DateofBirth
  • Sex
/ RM-M91-01
RM-M91-02
RM-M91-03
BR-M91-02 /
  • Thedataelementsmustcomplywiththedataformatsidentifiedinsection
7.10.1above. /
  • NHI Number
  • DateofBirth
/ RM-M01-08
BR-M91-03 /
  • Thedataelementsmustcomplywiththedatacoderangesidentifiedinsection7.10.2above.
/
  • Sex
/ RM-M01-08
BR-M91-04 /
  • TheNHINumbermustberegisteredontheNHIdatabasebeforesubmission.
/
  • NHI Number
/ RM-M91-06
BR-M91-05 /
  • TheDateofBirthinthissegmentmustbe≤theExtractDate.
/
  • DateofBirth
  • ExtractDate
/ RM-M91-07
BR-M91-06 /
  • TheBabyIdentitysegmentmustbepresentif
  • theBirthConditionissuppliedforthepregnancyandBirthCondition=‘LB’
or
  • thePostnatalBabyDetails
segmentissupplied. /
  • BabyIdentity
/ RM-M91-09

7.10.4BabyIdentitysegmenterror messages

Thefollowing businessrule responsesapplyto theValidationprocess:

Important Notes:

Responsemessagesareintended toprovide clarityaround conditionswherebusinessrules arenotsuccessfullymet:

1.An ‘Error’isfatal andtheprocesscannotproceeduntil corrected.

2.A ‘Warning’ means unusualconditionsencounteredbut areacceptable.

3.A message is expectedforeachinstanceof an encounterederrororwarningcondition.

ResponseMessageReference / ErrororWarning / MessageTitle / ResponseMessage
RM-M01-08 / Error / Error–XSDValidation /
  • AsystemgeneratedcontextualXSDerrormessageisprovided

RM-M91-01 / Error / Error–MissingConditionalData /
  • TheNHInumberfieldhasnotbeensuppliedintheBabyIdentitysegment.ItmustbesuppliedwhenBirthCondition=‘LB’

RM-M91-02 / Error / Error–MissingConditionalData /
  • TheDateofBirthfieldhasnotbeensuppliedintheBabyIdentitysegment.ItmustbesuppliedwhenBirthCondition=‘LB’.

RM-M91-03 / Error / Error–MissingConditionalData /
  • TheSexfieldhasnotbeen suppliedintheBabyIdentitysegment.ItmustbesuppliedwhenBirthCondition=‘LB’.

RM-M91-06 / Error / Error–InvalidData /
  • TheNHINumbersuppliedintheBabyIdentitysegmentisnotvalidintheNHIDatabase.

RM-M91-07 / Error / Error–InvalidData /
  • TheDateofBirthintheBabyIdentitysegmentisnotlessthanorequaltotheExtractDate.

RM-M91-09 / Error / Error–MissingMandatoryData /
  • TheBabyIdentitysegmenthasnotbeensupplied

7.11.Labourand BirthBabyDetailssegment

7.11.1Labour and Birth BabyDetails dataelements

Thedata elementsoftheLabourandBirthBabyDetailsSegmentare listed below.

TableKey:M=Mandatory.O=Optional.C=Conditional.

LabourandBirthBabyDetailsElements
DataElement / Type / Format / M/O/C / Coded / Verifiedattribute*
Ethnicity1 / Code / NNNNN / O / Y / -
Ethnicity2 / Code / NNNNN / O / Y / -
Ethnicity3 / Code / NNNNN / O / Y / -
BirthCondition / Code / XX / M / Y / -
ApgarScoreat5Mins / Non-negativeInteger / NN / O / - / -
BirthWeight / PositiveInteger / NNNN / O / - / Y
GestationalAge / PositiveInteger / NN / O / - / Y

* The Verified attribute is a booleanindicatorthatthe DHBmayuse toconfirmthatthe value for theelementbeing submitted is legitimatelyoutsidethepermissiblerange.

7.11.2Labour and Birth BabyDetails segment code sets

Thedata elementsoftheLabourandBirth BabyDetailssegmentthathavecodedvalues are listedbelow.

LabourandBirthBabyDetailsCodeSet
CodedDataElement / Range / Description
Ethnicity / RefertoAppendixCforthecompletelistofvalidLevel4ethnicitycodesandamappingtableofLevel2codestoLevel4codes
BirthCondition / LB / Live Born
SB / Stillborn

7.11.3Labour and Birth BabyDetails segment businessrules

Thefollowing businessrules applyto thedata associatedwiththeValidationprocess.

BusinessRuleReference / BusinessRuleDescription / AffectedData / ResponseMessageReference
BR-M61-01 /
  • Thesegmentmustcontainallmandatorydataasidentifiedinsection7.11.1above.
/
  • BirthCondition
/ RM-M01-08
BR-M61-02 /
  • Thedataelements,whenpresent,mustcomplywiththedataformatsidentifiedinsection7.11.1above.
/
  • Ethnicity
  • BirthCondition
  • ApgarScoreat5Mins
  • BirthWeight
  • GestationalAge
  • Verified
/ RM-01-08
BR-M61-03 /
  • Thedataelementsmustcomplywiththedatacoderangesidentifiedinsection7.11.2above.
/
  • Ethnicity
/ RM-M61-08
BR-M61-08 /
  • ApgarScoreat5Minsmustbebetween0and10
/
  • ApgarScoreat5Mins
/ RM-M61-14
BR-M61-09 /
  • Ifnotverified,BirthWeightmustbebetween300and7000(gm)
/
  • BirthWeight
/ RM-M61-15
BR-M61-10 /
  • Ifnotverified,GestationalAgemustbebetween20and44(weeks)
/
  • GestationalAge
/ RM-M61-16
BR-M61-11 /
  • NomorethanthreeEthnicitiesshouldbesupplied.
/
  • Ethnicity
/ RM-M01-08

7.11.4Labour and Birth BabyDetails segment errormessagesThefollowing businessrule responsesapplyto theValidationprocess:Important Notes:

Responsemessagesareintended toprovide clarityaround conditionswherebusinessrules arenotsuccessfullymet:

1.An ‘Error’isfatal andtheprocesscannotproceeduntil corrected.

2.A ‘Warning’meansunusualconditionsencounteredbut areacceptable.

3.A message is expectedfor eachinstanceof an encounterederrororwarningcondition.

ResponseMessageReference / ErrororWarning / MessageTitle / ResponseMessage
RM-M01-08 / Error / Error–XSDValidation /
  • AsystemgeneratedcontextualXSDerrormessageisprovided

RM-M61-08 / Error / Error–IncorrectCodeRange /
  • TheEthnicityintheLabourandBirthBabyDetailssegmentisnotwithinthecorrectcoderange.

RM-M61-14 / Error / Error–InvalidData /
  • TheApgarScoreat5MinsintheLabourandBirthBabyDetailssegmentisnot withintherange0-10.

RM-M61-15 / Error / Error–Value /
  • TheBirthWeightintheLabourandBirthBaby

ResponseMessageReference / ErrororWarning / MessageTitle / ResponseMessage
NotWithinRange / Detailssegmentisnotwithintherangeofprobablevalues300-7000(gm).Pleasereviewandconfirmascorrect.
RM-M61-16 / Error / Error–ValueNotWithinRange /
  • TheGestationalAgeintheLabourandBirthBabyDetailssegmentisnotwithintherangeofprobablevalues20-44(weeks).Pleasereviewandconfirmascorrect.

7.12.PostnatalBabyDetailssegment

7.12.1Postnatal BabyDetails dataelements

Thedata elementsofthePostnatalBabyDetailsSegmentare listedbelow.

TableKey:M=Mandatory.O=Optional.C=Conditional.

PostnatalBabyDetailsElements
DataElement / Type / Format / M/O/C / Coded
BreastFeedingStatusat2Weeks / Code / X(10) / O / Y
BreastFeedingStatusatDischarge / Code / X(10) / O / Y
DateofNeonatalDeath / Date / YYYY-MM-DD / O / -

7.12.2Postnatal BabyDetails segment codesets

Thedata elementsofthePostnatalBabyDetailssegmentthathavecodedvaluesare listedbelow.

PostnatalBabyDetailsCodeSet
CodedDataElement / Range / Description
BreastFeedingStatus / Exclusive / The babyhasneverhadanywater,formula orotherliquid orsolidfood;andonlybreastmilk,fromthebreastor expressed,andprescribedmedicines havebeengiven tothebabyfrombirth.
Fully / The babyhastakenbreastmilkonly, no otherliquidsorsolids except aminimalamount of water orprescribedmedicines,intheprevious48hours.
Partial / The babyhastakensome breast-milkand someinfantformula orothersolidfood inthepast48hours
Artificial / The babyhashad nobreastmilk in thepast48 hoursbut hashadalternativeliquidsuchas infantformulawithor withoutsolidfoodinthepast 48 hours

7.12.3Postnatal BabyDetails segment businessrules

Thefollowing businessrules applyto thedata associatedwiththeValidationprocess.

BusinessRuleReference / BusinessRuleDescription / AffectedData / ResponseMessageReference
BR-M81-01 /
  • Thedataelements,whenpresentmustcomplywiththedataformatsidentifiedinsection7.12.1above.
/
  • DateofNeonatalDeath
/ RM-M01-08
BR-M81-02 /
  • Thedataelementsmustcomplywiththedatacoderangesidentifiedinsection7.12.2above.
/
  • BreastFeedingStatusat2Weeks
  • BreastFeedingStatusatDischarge
/ RM-M01-08

7.12.4Postnatal BabyDetails segment error messages

Thefollowing businessrule responsesapplyto theValidationprocess:

Important Notes:

Responsemessagesareintended toprovide clarityaround conditionswherebusinessrules arenotsuccessfullymet:

1.An ‘Error’isfatal andtheprocesscannotproceeduntil corrected.

2.A ‘Warning’meansunusualconditionsencounteredbut areacceptable.

3.A message is expectedfor eachinstanceof an encounterederrororwarningcondition.

ResponseMessageReference / ErrororWarning / MessageTitle / ResponseMessage
RM-M01-08 / Error / Error–XSDValidation /
  • AsystemgeneratedcontextualXSDerrormessageisprovided

7.13.Reversefilerootsegment

7.13.1Reverse fileroot segment businessrules

Thefollowing businessrules applytothedata associatedwiththeValidationprocess.

BusinessRuleReference / BusinessRuleDescription / AffectedData / ResponseMessageReference
BR-M311-01 /
  • Therootsegmentmustbepresentinthereversefile.
/
  • Rootsegment
/ RM-M01-08

7.13.2Reverse fileroot segment error messages

Thefollowing businessrule responsesapplyto theValidationprocess:

Important Notes:

Responsemessagesareintended toprovide clarityaround conditionswherebusinessrules arenotsuccessfullymet:

1.An ‘Error’isfatal andtheprocesscannotproceeduntilcorrected.

2.A ‘Warning’meansunusualconditionsencounteredbut areacceptable.

3.A message is expectedfor eachinstanceof an encounterederrororwarning condition.

ResponseMessageReference / ErrororWarning / MessageTitle / ResponseMessage
RM-M08-01 / Error / Error–MissingMandatoryData /
  • Therootsegmenthasnotbeensuppliedinthereversefile

7.14.Reversalsegment

7.14.1Reversal data elements

Thedata elementsoftheReversalSegmentare listedbelow.

TableKey:M=Mandatory.O=Optional.C=Conditional.

ReversalElements
DataElement / Type / Format / M/O/C / Coded
DocumentReferenceToReverse / String / X(37) / M / -

7.14.2Reversal segment businessrules

Thefollowing businessrules applyto thedata associatedwiththeValidationprocess.

BusinessRuleReference / BusinessRuleDescription / AffectedData / ResponseMessageReference
BR-M301-01 /
  • Thesegmentmustcontainallmandatorydataasidentifiedinsection7.14.1above.
/
  • DocumentReferenceToReverse
/ RM-M01-08
BR-M301-02 /
  • Thedataelementmustcomplywiththedataformatsidentifiedinsection7.14.1above.
/
  • DocumentReferenceToReverse
/ RM-M01-08
BR-M301-03 /
  • EnsuringtheDHBwhosubmittedtheoriginalrecordistheonlyDHBthatcanreversetherecordwithinthesameenvironment.
/
  • DHB
/ RM-301-03

7.14.3Reversal segmenterrormessages

Thefollowing businessrule responsesapplyto theValidationprocess:

Important Notes:

Responsemessagesareintended toprovide clarityaround conditionswherebusinessrules arenotsuccessfullymet:

1.An‘Error’isfatal andtheprocesscannotproceeduntil corrected.

2.A ‘Warning’meansunusualconditionsencounteredbut areacceptable.

3.A message is expectedfor eachinstanceof an encounterederrororwarningcondition.

ResponseMessageReference / ErrororWarning / MessageTitle / ResponseMessage
RM-M01-08 / Error / Error–XSDValidation /
  • AsystemgeneratedcontextualXSDerrormessageisprovided

RM-M301-03 / Error / Error–InvalidDHB /
  • TheDHBsubmittingthisdatadiffersfromtheoriginatingDHBorsubmittingororiginalenvironmentdiffer.

8.MATExtractFileRecordTypes

TheExtractFilehasthe following requesttypesthatallowthesubmissionofdata:

  • .CreateRequestfor adding newpregnancydetails records
  • A Createrecord should beusedtosend all thedatafor thepregnancythattheDHB has.TheDHBassigns auniqueidentifier (aGUID)toapregnancyrecord.Thisis thepregnancyrecord’sidentifier in theMATODS database
  • For anewpregnancyrecord tobe created itmustnotexist in theODSdatabasei.e.Theremustnotbe arecord inthe ODS withthe samePregnancyIdentifier.
  • If a pregnancyrecordwith adifferentPregnancyIdentifierexists in theODS databasewithdatathat iseitherpartlyor entirelythe same,thecreaterecordwill be rejected.SeeTable1:Duplicate recordidentificationfields.
  • Createshouldnotbeusedtoestablisha pregnancyrecord with aviewtolaterupdatingit with moredata.
  • ReplaceRequestfor changing anexisting pregnancydetails record
  • TheReplacerequestallows the DHB tocorrect anyissues with thepregnancydata.
  • TheReplacerequestmusthavethe samePregnancyIdentifieras thePregnancyIdentifierthatwas usedtoaddthepregnancyto thedatabase.
  • TheReplacerecordreplaceseverythingfor thegivenPregnancyIdentifier.Thereforeallthedatamustbe resent.
  • DeleteRequestfordeletinganexisting pregnancydetails record
  • An activepregnancyrecord mustexist in theODS databasefor thePregnancyIdentifiersupplied inaDeleterequest.
  • TheDeleterequestlabels thepregnancyrecord with the givenPregnancyIdentifier asdeleted intheMATODSdatabase.Therefore aPregnancyIdentifiershouldnotbe re-used.
  • DeleteandthenCreateshouldnotbeusedtoamenddata.Replaceshouldbeused.

Table1:Duplicaterecordidentificationfields

Module / Fields
Antenatal / DHBofService,WomanNHI,DateofFirstAntenatalService
Labour/Birth / DHBofService,WomanNHI,DeliveryDate
Postnatal / DHBofService,WomanNHI,DateofPostnatalService

8.1.Extractfilerecordrequest processing rules

Thefollowing businessrules identifythe requirementsfor RequestProcessing thattakes validpregnancyrecords andattemptstoapplythemtotheODSdatabase.