Commissioning Data Set Version 6-2 XML Schema Constraints

XML Schema constraints applied to the Commissioning Data Sets V6-2.

The "Allowed Values" column indicates the NHS Data Model and Dictionary National Codes and Default Codes present in the XML Schema:

Data ElementXML Schema Format/LengthAllowed ValuesRangePattern MatchReason / Comment / XML Choice
A and E ATTENDANCE NUMBERmax an12
None
None
None
Existing Format/Length states an12 - XML Schema allows max an12
ACCIDENT AND EMERGENCY DIAGNOSIS - FIRSTmin an2 max an6
None
None
None
Existing Format/Length states an6 - XML Schema allows min an2 max an6
ACCIDENT AND EMERGENCY DIAGNOSIS - SECONDmin an2 max an6
None
None
None
Existing Format/Length states an6 - XML Schema allows min an2 max an6
ACCIDENT AND EMERGENCY INVESTIGATION - FIRSTmin an2 max an6
None
None
None
Existing Format/Length states an6 - XML Schema allows min an2 max an6
ACCIDENT AND EMERGENCY INVESTIGATION - SECONDmin an2 max an6
None
None
None
Existing Format/Length states an6 - XML Schema allows min an2 max an6
ACCIDENT AND EMERGENCY TREATMENT - FIRSTmin an2 max an6
None
None
None
Existing Format/Length states an6 - XML Schema allows min an2 max an6
ACCIDENT AND EMERGENCY TREATMENT - SECONDmin an2 max an6
None
None
None
Existing Format/Length states an6 - XML Schema allows min an2 max an6
ACTIVITY LOCATION TYPE CODENone
A01,A02,A03,A04,B01,B02,C01,C02,C03,D01,D02,D03,
E01,E02,E03,E04,E99,F01,G01,G02,G03,H01,J01,K01,K02,
L01,L02,L03,L04,L05,L06,L99,M01,M02,M03,M04,M05,
N01,N02,N03,N04,N05,X01
None
None
National Code G04 removed (not allowed in XML Schema)
ADVANCED CARDIOVASCULAR SUPPORT DAYSmax n3
None
None
None
Existing Format/Length states n3 - XML Schema allows max n3
ADVANCED RESPIRATORY SUPPORT DAYSmax n3
None
None
None
Existing Format/Length states n3 - XML Schema allows max n3
AGE AT CDS ACTIVITY DATEmax n3
None
None
None
Existing Format/Length states n3 - XML Schema allows max n3
AGE AT CENSUSmax n3
None
None
None
Existing Format/Length states n3 - XML Schema allows max n3
AGE ON ADMISSIONmax n3
None
None
None
Existing Format/Length states n3 - XML Schema allows max n3
ATTENDANCE IDENTIFIERmax an12
None
None
None
Existing Format/Length states an12 - XML Schema allows max an12
BASIC CARDIOVASCULAR SUPPORT DAYSmax n3
None
None
None
Existing Format/Length states n3 - XML Schema allows max n3
BASIC RESPIRATORY SUPPORT DAYSmax n3
None
None
None
Existing Format/Length states n3 - XML Schema allows max n3
BIRTH WEIGHTmax n4
None
None
None
Existing Format/Length states n4 - XML Schema allows max n4
CARE PROFESSIONAL MAIN SPECIALTY CODENone
100,101,110,120,130,140,141,142,143,145,146,147,148,149,
150,160,170,171,180,190,192,300,301,302,303,304,305,310,
311,312,313,314,315,320,321,325,326,330,340,350,352,360,
361,370,371,400,401,410,420,421,430,450,451,460,501,502,
504,560,600,601,700,710,711,712,713,715,800,810,820,821,
822,823,824,830,831,833,834,900,901,902,903,904,950,960,
199,499
None
None
National Code 500 removed (not allowed in XML Schema)
CDS COPY RECIPIENT IDENTITYmin an3 max an12
Removed
None
None
Field size extended to future proof for ODS ORGANISATION CODE changes
CDS MESSAGE REFERENCEmax n7
None
None
None
Existing Format/Length states n7 - XML Schema allows max n14 but SUS accepts max n7
CDS MESSAGE VERSION NUMBERNone
CDS062
None
None
Message version is hard coded in the XML Schema
CDS PRIME RECIPIENT IDENTITYmin an3 max an12
Removed
None
None
Field size extended to future proof for ODS ORGANISATION CODE changes
CDS SENDER IDENTITYmin an3 max an12
None
None
None
Field size extended to future proof for ODS ORGANISATION CODE changes
CDS UNIQUE IDENTIFIERmax an35
None
None
None
Existing Format/Length states an35 - XML Schema allows max an35
COMMISSIONER REFERENCE NUMBERmax an17
None
None
None
Existing Format/Length states an17 - XML Schema allows max an17
COMMISSIONING SERIAL NUMBERmax an6
None
None
None
Existing Format/Length states an6 - XML Schema allows max an6
CONSULTATION MEDIUM USEDNone
01,02,03,04
None
None
National Codes 05, 06 and 98 are not used in CDS version 6-2
COUNT OF DAYS SUSPENDEDmax n4
None
None
None
Existing Format/Length states n4 - XML Schema allows max n4
CRITICAL CARE ACTIVITY CODENone
01,02,03,04,05,06,07,08,09,10,11,12,13,14,
15,16,21,22,23,24,25,26,27,28,29,50,51,52,
53,55,56,57,58,59,60,61,62,63,64,65,66,67,
68,69,70,71,72,73,74,99
None
None
National Codes 80, 81, 82, 83, 84, 85, 94, 95, 96 and 97 removed (not allowed in the XML Schema)
CRITICAL CARE LEVEL 2 DAYSmax n3
None
None
None
Existing Format/Length states n3 - XML Schema allows max n3
CRITICAL CARE LEVEL 3 DAYSmax n3
None
None
None
Existing Format/Length states n3 - XML Schema allows max n3
CRITICAL CARE LOCAL IDENTIFIERmax an8
None
None
None
Existing Format/Length states an8 - XML Schema allows max an8
DERMATOLOGICAL SUPPORT DAYSmax n3
None
None
None
Existing Format/Length states n3 - XML Schema allows max n3
DISCHARGE METHOD CODE (HOSPITAL PROVIDER SPELL)None
1,2,3,4,5,8,9
None
None
National Codes 6 and 7 are not used in CDS version 6-2
DURATION OF CARE TO PSYCHIATRIC CENSUS DATEmax n5
None
None
None
Existing Format/Length states n5 - XML Schema allows max n5
DURATION OF DETENTIONmax n5
None
None
None
Existing Format/Length states n5 - XML Schema allows max n5
DURATION OF ELECTIVE WAITmax n4
None
None
None
Existing Format/Length states n4 - XML Schema allows max n4
ELECTIVE ADMISSION LIST ENTRY NUMBERmax an12
None
None
None
Existing Format/Length states an12 - XML Schema allows max an12
EPISODE NUMBERmax an2
None
None
None
Existing Format/Length states an2 - XML Schema allows max an2
ETHNIC CATEGORYmax an2
None
None
None
Existing Format/Length means fixed length which is incorrect. Unable to change this as it is used in other data sets.
Second character can be for local use.
Format/Length amended to max an2
GASTRO-INTESTINAL SUPPORT DAYSmax n3
None
None
None
Existing Format/Length states n3 - XML Schema allows max n3
GENERAL MEDICAL PRACTITIONER PRACTICE (ANTENATAL CARE)min an3 max an12
Removed
None
None
Field size extended to future proof for ODS ORGANISATION CODE changes
GENERAL MEDICAL PRACTICE CODE (PATIENT REGISTRATION)min an3 max an12
Removed
None
None
Field size extended to future proof for ODS ORGANISATION CODE changes
GENERAL MEDICAL PRACTITIONER (ANTENATAL CARE)None
Removed
None
None
National Codes and default codes not enumerated in the XML Schema
GENERAL MEDICAL PRACTITIONER (SPECIFIED)None
Removed
None
None
National Codes and default codes not enumerated in the XML Schema
HOSPITAL PROVIDER SPELL NUMBERmax an12
None
None
None
Existing Format/Length states an12 - XML Schema allows max an12
INTENDED SITE CODE (OF TREATMENT)min an3 max an12
Removed
None
None
Field size extended to future proof for ODS ORGANISATION CODE changes
LIVER SUPPORT DAYSmax n3
None
None
None
Existing Format/Length states n3 - XML Schema allows max n3
LOCAL PATIENT IDENTIFIERmax an10
None
None
None
Existing Format/Length states an10 - XML Schema allows max an10
LOCAL PATIENT IDENTIFIER (BABY)max an10
None
None
None
Existing Format/Length states an10 - XML Schema allows max an10
LOCAL PATIENT IDENTIFIER (MOTHER)max an10
None
None
None
Existing Format/Length states an10 - XML Schema allows max an10
MENTAL HEALTH ACT LEGAL STATUS CLASSIFICATION CODE (AT CENSUS DATE)None
01,02,03,04,05,06,07,08,09,10,11,12,13,14,
15,16,17,18,19,20,31,32,34,35,36,37,38
None
None
Additional National Codes 37 and 38 added
MENTAL HEALTH ACT LEGAL STATUS CLASSIFICATION CODE (ON ADMISSION)None
01,02,03,04,05,06,07,08,09,10,11,12,13,14,
15,16,17,18,19,20,31,32,34,35,36,37,38
None
None
Additional National Codes 37 and 38 added
NEUROLOGICAL SUPPORT DAYSmax n3
None
None
None
Existing Format/Length states n3 - XML Schema allows max n3
NHS SERVICE AGREEMENT LINE NUMBERmax an10
None
None
None
Existing Format/Length states an10 - XML Schema allows max an10
ORGAN SUPPORT MAXIMUMNone
None
00-06
None
Range 00-06 allowed
ORGANISATION CODE (CODE OF COMMISSIONER)min an3 max an12
Removed
None
None
Field size extended to future proof for ODS ORGANISATION CODE changes
ORGANISATION CODE (CODE OF PROVIDER)min an3 max an12
Removed
None
None
Field size extended to future proof for ODS ORGANISATION SITE CODE changes
ORGANISATION CODE (LOCAL PATIENT IDENTIFIER)min an3 max an12
None
None
None
Field size extended to future proof for ODS ORGANISATION CODE changes
ORGANISATION CODE (LOCAL PATIENT IDENTIFIER (BABY))min an3 max an12
None
None
None
Field size extended to future proof for ODS ORGANISATION SITE CODE changes
ORGANISATION CODE (LOCAL PATIENT IDENTIFIER (MOTHER))min an3 max an12
None
None
None
Field size extended to future proof for ODS ORGANISATION SITE CODE changes
ORGANISATION CODE (PATIENT PATHWAY IDENTIFIER ISSUER)min an3 max an12
None
None
None
Field size extended to future proof for ODS ORGANISATION CODE changes
ORGANISATION CODE (RESIDENCE RESPONSIBILITY)min an3 max an12
Removed
None
None
Field size extended to future proof for ODS ORGANISATION CODE changes
PERSON WEIGHTn3.n3
None
None
None
Existing Format/Length states max n3.max n3 - XML Schema enforces 3 digits before and after the decimal point - max removed
PRIMARY DIAGNOSIS (READ)max an5
None
None
None
Existing Format/Length allows for all clinical classifications -XML Schema allows max an5
PROVIDER REFERENCE NUMBERmax an17
None
None
None
Existing Format/Length states an17 - XML Schema allows max an17
REFERRER CODENone
Removed
None
None
National Codes and default codes not enumerated in the XML Schema
REFERRING ORGANISATION CODEmin an3 max an12
Removed
None
None
Field size extended to future proof for ODS ORGANISATION CODE changes
RENAL SUPPORT DAYSmax n3
None
None
None
Existing Format/Length states n3 - XML Schema allows max n3
SECONDARY DIAGNOSIS (READ)max an5
None
None
None
Existing Format/Length allows for all clinical classifications -XML Schema allows max an5
SITE CODE (OF TREATMENT)min an3 max an12
Removed
None
None
Field size extended to future proof for ODS ORGANISATION SITE CODE changes