@@ -189,9 +189,22 @@ void RunStudentPersonalConsumer()
189189
190190 // Create a new student.
191191 if ( log . IsInfoEnabled ) log . Info ( "*** Create a new student." ) ;
192+ string [ ] text = new string [ ]
193+ {
194+ @"
195+ <MedicalCondition>
196+ <ConditionID>Unique Medical Condition ID</ConditionID>
197+ <Condition>Condition</Condition>
198+ <Severity>Condition Severity</Severity>
199+ <Details>Condition Details</Details>
200+ </MedicalCondition>
201+ "
202+ } ;
203+ SIF_ExtendedElementsTypeSIF_ExtendedElement extendedElement = new SIF_ExtendedElementsTypeSIF_ExtendedElement { Name = "MedicalConditions" , Text = text } ;
204+ SIF_ExtendedElementsTypeSIF_ExtendedElement [ ] extendedElements = new SIF_ExtendedElementsTypeSIF_ExtendedElement [ ] { extendedElement } ;
192205 NameOfRecordType newStudentName = new NameOfRecordType { FamilyName = "Wayne" , GivenName = "Bruce" , Type = NameOfRecordTypeType . LGL } ;
193206 PersonInfoType newStudentInfo = new PersonInfoType { Name = newStudentName } ;
194- StudentPersonal newStudent = new StudentPersonal { LocalId = "555" , PersonInfo = newStudentInfo } ;
207+ StudentPersonal newStudent = new StudentPersonal { LocalId = "555" , PersonInfo = newStudentInfo , SIF_ExtendedElements = extendedElements } ;
195208 StudentPersonal retrievedNewStudent = studentPersonalConsumer . Create ( newStudent ) ;
196209 if ( log . IsInfoEnabled ) log . Info ( "Created new student " + newStudent . PersonInfo . Name . GivenName + " " + newStudent . PersonInfo . Name . FamilyName ) ;
197210
@@ -290,6 +303,22 @@ void RunStudentPersonalConsumer()
290303 foreach ( StudentPersonal student in teachingGroupStudents )
291304 {
292305 if ( log . IsInfoEnabled ) log . Info ( "Student name is " + student . PersonInfo . Name . GivenName + " " + student . PersonInfo . Name . FamilyName ) ;
306+
307+ if ( student . SIF_ExtendedElements != null && student . SIF_ExtendedElements . Length > 0 )
308+ {
309+
310+ foreach ( SIF_ExtendedElementsTypeSIF_ExtendedElement element in student . SIF_ExtendedElements )
311+ {
312+
313+ foreach ( string content in element . Text )
314+ {
315+ if ( log . IsInfoEnabled ) log . Info ( "Extended element text is ...\n " + content ) ;
316+ }
317+
318+ }
319+
320+ }
321+
293322 }
294323
295324 }
0 commit comments