Click here to Skip to main content
       

C#

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
AnswerRe: WCF REST Service : Using Bing MapmvpRichard MacCutchan8-Dec-12 22:40 
Google easily found these links[^] and Bing Maps API[^].
One of these days I'm going to think of a really clever signature.

GeneralRe: WCF REST Service : Using Bing MapmemberVijay Kanda9-Dec-12 10:33 
Richard,
Thanks for the links... I read those links... But they don't explain which namespace or dill file I have to reference etc... I just need a quick tutorial how to use the BIng Maps Route APIs ... Thanks
GeneralRe: WCF REST Service : Using Bing MapmvpRichard MacCutchan9-Dec-12 21:30 
Vijay Kanda wrote:
I just need a quick tutorial how to use the BIng Maps Route APIs
I am afraid that you will have to look for it yourself. This site exists to help people with specific technical problems, but we do not have the time (or in my case the skills) to provide tutorials on every subject in the IT field.
One of these days I'm going to think of a really clever signature.

QuestionUsing Bing map or google geocodermemberVijay Kanda8-Dec-12 14:08 
I am creating a REST Service project (just for learning purpose) and using Bing Map... This is what I want to accomplish...I am sending my current location (Latitude and longitude) to the service and I want to find out all the nearest Mac Donalds (for example) within 1 mile range from my current location and the distance and the time it will take me to get each Mac Donalds... I know there are BING MAP APIs which I can use to accomplish ...
But I never used BING map or rest service before... so can anyone please tell me the Bing Map method/API names which take latitude and longitude as argument and retrun the info that I mentioned above.

Thanks.
AnswerRe: Using Bing map or google geocodermemberSimon_Whale8-Dec-12 23:43 
Have a look at Sacha Barber's his zombie article covers most of what you are after.
 
You can find the article here on CP. I would post a link but I'm writing this on a phone
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch

GeneralRe: Using Bing map or google geocodermemberVijay Kanda9-Dec-12 10:30 
Simon,
Thanks... really appreciate it... I could not find the article which you mentioned... please let me know the url when you have a chance...
 
Thanks again.
AnswerRe: Using Bing map or google geocodermemberSimon_Whale9-Dec-12 12:07 
Zombie Explorer : A N-Tier application from top to bottom[^]
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch

QuestionSomewhat embarrassed: how do I get the dotnet framework?memberPHS2418-Dec-12 0:11 
Guys,
 
Create a console application. Select the project name in the solution explorer and Alt-Enter or right-click the properties and select the Application tab. Change the Target Framework to say 3.5 or something else other than 2.0. Paste this line into the Main method:
 
Console.WriteLine("Version=" + Assembly.GetExecutingAssembly().ImageRuntimeVersion);
 
and run it. I was sort of expecting to see it display the target framework I selected. Instead it displays v.2.0.50727 even though my target framework was set to 3.5. Obviously, I've misunderstood that line of code. Does anyone know what I can do to get the target version I selected? I don't want to do anything as a result of getting it so I just want to display it.Blush | :O
"I do not have to forgive my enemies, I have had them all shot." — Ramón Maria Narváez (1800-68).
"I don't need to shoot my enemies, I don't have any." - Me (2012).

AnswerRe: Somewhat embarrassed: how do I get the dotnet framework?mvpOriginalGriff8-Dec-12 1:54 
Odd. I pasted your code into my app, and it gave me
Version=v4.0.30319
Which is what I would expect for a V4.0 C# app.
 
Are you sure you compiled and ran the right version?
Have you tried a full rebuild?
If you get an email telling you that you can catch Swine Flu from tinned pork then just delete it. It's Spam.

GeneralRe: Somewhat embarrassed: how do I get the dotnet framework?memberPHS2418-Dec-12 9:31 
OG, I did indeed a clean and a full rebuild. Eddy Vluggen's reply after yours might well be the thing that decides what gets returned. I'll rebuild it in VS2012 and see what pops out of the woodwork as my VS2008 only lists upto 3.5.
"I do not have to forgive my enemies, I have had them all shot." — Ramón Maria Narváez (1800-68).
"I don't need to shoot my enemies, I don't have any." - Me (2012).

AnswerRe: Somewhat embarrassed: how do I get the dotnet framework? [modified]memberEddy Vluggen8-Dec-12 2:44 
PHS241 wrote:
Instead it displays v.2.0.50727 even though my target framework was set to 3.5.

.NET 2.0 would report the 2.0 framework, but 3.0 and 3.5 are "extensions" to the 2.0 runtime. 4.0 has a new runtime again, so that will report back version 4.
 
--edit;
There's a distinction between the target-framework, and the supported runtime. If it's a desktop-application, than you'll have an app.config file in there, and an "appname.exe.config" file in your Debug folder.
 
See MSDN[^].
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]
They hate us for our freedom![^]


modified 8-Dec-12 11:40am.

GeneralRe: Somewhat embarrassed: how do I get the dotnet framework?memberPHS2418-Dec-12 9:33 
Thanks Eddy. I'll research the config setting in more detail.
"I do not have to forgive my enemies, I have had them all shot." — Ramón Maria Narváez (1800-68).
"I don't need to shoot my enemies, I don't have any." - Me (2012).

Questionneed help pleasememberGondzer7-Dec-12 23:58 
 
for (int i = 0; i < 5; i++)
{
   i = int.Parse(Console.ReadLine());
}
Console.Write(i);
Console.ReadKey();
how to get console to print all of the numbers entered (5 numbers)? when i debug this it says that the name 'i' does not exist in current context.
AnswerRe: need help pleasememberMycroft Holmes8-Dec-12 1:02 
Put the console.write and console.readkey INSIDE the for next loop. Move the } down 2 lines.
Never underestimate the power of human stupidity
RAH

GeneralRe: need help pleasememberGondzer8-Dec-12 1:09 
i've tried that, it just writes the numbers straight after the entering, i want it to write all 5 AFTER i've entered the fifth number.
GeneralRe: need help pleasememberMycroft Holmes8-Dec-12 1:41 
And that make no sense at all, you would have to put the numbers into a container (array/List<>) and then loop through the container and print them!
Never underestimate the power of human stupidity
RAH

AnswerRe: need help pleasemembervr9999999998-Dec-12 1:04 
problem in this code is that 'i' is only defined for 'for loop ' to make it run u have to define i before for loop
ex:
int i = new int();
for (i = 0; i < 5; i++)
{
i = int.Parse(Console.ReadLine());
}
Console.Write(i);
Console.ReadKey();
it will not give any error but don't give u the result u want it should be like this..
static void Main(string[] args)
{
int i = new int();
int []arry=new int[5];
for (i = 0; i < 5; i++)
{
arry[i] = int.Parse(Console.ReadLine());
}
for (i = 0; i < 5; i++)
{
Console.Write(arry[i]+"\n");
}

Console.ReadKey();
}
GeneralRe: need help pleasememberGondzer8-Dec-12 1:17 
ok, I thought I could do it without the arrays, but thanks anyway
AnswerRe: need help pleasemvpOriginalGriff8-Dec-12 2:03 
Just to add to what the others have said - you don't want to do it like that anyway!
for (int i = 0; i < 5; i++)
{
   i = int.Parse(Console.ReadLine());
}
Since i is both the loop control variable and the place you store the value the user entered, if the user enters 4 or above as his first number, it will exit the loop immediately.
You need to separate these two functions into two variables, as well as using an array or List<int>
 
BTW: It is considered a bad idea to use "magic numbers" such as "5" in your code - when you move to an array, it is too easy to later change one and not the other, causing your application to fail, or crash:
int[] inp = new int[5];
for (int i = 0; i < 5; i++)
   {
   inp[i] = int.Parse(Console.ReadLine());
   }
would be better as:
const int elements = 5;
int[] inp = new int[elements];
for (int i = 0; i < elements; i++)
    {
    inp[i] = int.Parse(Console.ReadLine());
    }
That way, you only have to change the number of elements in a single place, and it all works perfectly.
 
And as a final thing, if your user enters an alphabetic character instead of a digit, your program will crash. You should always check your user input - they do enter rubbish quite often! Laugh | :laugh:
 

[edit]Typos - OriginalGriff[/edit]
If you get an email telling you that you can catch Swine Flu from tinned pork then just delete it. It's Spam.

AnswerRe: need help pleasememberjibesh9-Dec-12 22:03 
i wonder how this programs builds without any error?
 
there are few things you need to check here
1.the variable i is accessible only inside the loop and its local to that loop never accessible outside the loops.
2. the indexer variable i is modified against your input which may alter the loop execution
3. Console.Write is outside the loop so if variable i is acceible outside the loop it will print only the last entered value not all
 
try modifying your code.
define a new variable to store the read line
and move the Console.Write inside the loop and see the difference
Jibesh.V.P
India

QuestionInsert Data to Master/Detail table in Sqlserver 2005 from C# with Foreign key in Detail tablememberahmed_one7-Dec-12 20:31 
I need some help to make a Order Form in C#. My development environment is:
 
Microsoft Visual Studio 2010 Ultimate Sql Server Express Edition 2005 Programming Language C# Sample Database = NorthWind (Tables=Orders and OrderDetails)
 
I've create a Form for order dataentry, which contain Textbox for OrderID, Combobox for Customer, DateTimePickers for OrderDate and ShippedDate and a DataGridView which contains Cokumns OrderID=ReadOnly, ProductID, UnitPrice & Quantity:
 
In the form load event I've the following code:
 
private void Inv2_Load(object sender, EventArgs e)
    {
 

        SetComb();
        connectionString = ConfigurationManager.AppSettings["connectionString"];
        sqlConnection = new SqlConnection(connectionString);
 
        qryOrd = "Select OrderID, CustomerID, OrderDate, ShippedDate from Orders";
        qryOrdDet = "Select OrderID, ProductID, UnitPrice, Quantity from OrderDetails";
 
        sqlConnection.Open();
        sqlDataMaster = new SqlDataAdapter(qryOrd, sqlConnection);
        sqlDataDet = new SqlDataAdapter(qryOrdDet, sqlConnection);
 
        //SET MASTER INSERT/UPDATES
        command = new SqlCommand("INSERT INTO Orders ( CustomerID, OrderDate, ShippedDate) VALUES (@CustID, @OrdDt, @ShipDt) SELECT SCOPE_IDENTITY();");
 
        command.Parameters.Add("@OrdID", SqlDbType.NVarChar, 15);
        command.Parameters.Add("@CustID", SqlDbType.VarChar, 15);
        command.Parameters["@CustID"].Value = cmbCust.SelectedText;
 
        command.Parameters.Add("@OrdDt", SqlDbType.DateTime);
        command.Parameters["@OrdDt"].Value = dtOrdDt.Text;
 
        command.Parameters.Add("@ShipDt", SqlDbType.DateTime);
        command.Parameters["@ShipDt"].Value =dtShipDt.Text;
 

 
        sqlDataMaster.InsertCommand = command;
        //string id = command.ExecuteScalar().ToString();

        command = new SqlCommand("UPDATE Orders SET CustomerID = @CustID, OrderDate = @OrdDt, ShippedDate = @ShipDt WHERE OrderID = @OrdID");
 
        command.Parameters.Add("@OrdID", SqlDbType.NVarChar, 15, "OrderID").Value = txtOrdID.Text; 
        command.Parameters.Add("@CustID", SqlDbType.VarChar, 15, "CustomerID").Value = cmbCust.Text;
        command.Parameters.Add("@OrdDt", SqlDbType.DateTime).Value = dtOrdDt.Text;
        command.Parameters.Add("@ShipDt", SqlDbType.DateTime).Value = dtShipDt.Text;
        sqlDataMaster.UpdateCommand = command;
 

        //SET DETAILS INSERT/UPDATES
        commandDet = new SqlCommand("INSERT INTO OrderDetails (ProductID, UnitPrice, Quantity) VALUES (@PrdID, @Up,@Qty)");
 
        //commandDet.Parameters.Add("@OrdID", SqlDbType.NVarChar, 15, "OrderID").Value = txtOrdID.Text; ;  
        commandDet.Parameters.Add("@PrdId", SqlDbType.NVarChar, 5, "ProductID");
        commandDet.Parameters.Add("@Up", SqlDbType.VarChar, 50, "UnitPrice");
        commandDet.Parameters.Add("@Qty", SqlDbType.VarChar, 20, "Quantity");
        sqlDataDet.InsertCommand = commandDet;
 
        commandDet = new SqlCommand("UPDATE OrderDetails SET ProductID = @PrdID, UnitPrice = @Up, Quantity = @Qty WHERE OrderID = @OrdID");
        commandDet.Parameters.Add("@OrdID", SqlDbType.NVarChar, 15, "OrderID").Value = txtOrdID.Text; ;  
        commandDet.Parameters.Add("@PrdId", SqlDbType.NVarChar, 5, "ProductID");
        commandDet.Parameters.Add("@Up", SqlDbType.VarChar, 50, "UnitPrice");
        commandDet.Parameters.Add("@Qty", SqlDbType.VarChar, 20, "Quantity");
        sqlDataDet.UpdateCommand = commandDet;
 
        sqlComBldMaster = new SqlCommandBuilder(sqlDataMaster);
        sqlComBldDet = new SqlCommandBuilder(sqlDataDet);
 
        dt = new DataTable();
        dtDet = new DataTable();
 

        dt.Clear();
        dtDet.Clear();
 

        sqlDataMaster.FillSchema(dt, SchemaType.Source);
        sqlDataDet.FillSchema(dtDet, SchemaType.Source);
 
        dtDet.Columns["OrderID"].AutoIncrement = true;
        dtDet.Columns["OrderID"].AutoIncrementSeed = -1;
        dtDet.Columns["OrderID"].AutoIncrementStep = -1;
        ds = new DataSet();
        ds.Tables.Add(dt);
        ds.Tables.Add(dtDet);
        ds.EnforceConstraints = false;
 

 
        DataRelation rel = new DataRelation("OrdersRel", ds.Tables["Orders"].Columns["OrderID"], ds.Tables["OrderDetails"].Columns["OrderID"]);
        ds.Relations.Add(rel);
 
        bs = new BindingSource();
        bsDet = new BindingSource();
 
        bs.DataSource = ds;
        bs.DataMember = "Orders";
 
        bsDet.DataSource = ds;
        bsDet.DataMember = "OrderDetails";
 

        dgInvDet.AutoGenerateColumns = false;
 
        dgInvDet.Columns["ProductID"].DataPropertyName = "ProductID";
        ProductID.DataSource = dm.GetData("Select * from Products order by ProductName");
        ProductID.DisplayMember = "ProductName";
        ProductID.ValueMember = "ProductID";
        dgInvDet.Columns["UnitPrice"].DataPropertyName = "UnitPrice";
        dgInvDet.Columns["Quantity"].DataPropertyName = "Quantity";   
 
        dgInvDet.DataSource = bsDet;
 

 
    }
 

public void SetComb()
    {
        cmbCust.DataSource = dm.GetData("Select * from Customers order by CompanyName");
        cmbCust.DisplayMember = "CompanyName";
        cmbCust.ValueMember = "CustomerId";
        cmbCust.Text = "";
 

 
    }
 
"Dm.GetData" is the Data Access class method created for the purpose of just retrieving reocrds...
 
And in the Save button click event:
 
private void btnSave_Click(object sender, EventArgs e)
    {
 

     dt.EndInit();
    rec = sqlDataMaster.Update(ds.Tables[0]);
    rec += sqlDataDet.Update(ds.Tables[1]);
     //recDet = sqlDataDet.Update(dt);

     ds.AcceptChanges();
 

     MessageBox.Show(rec + " record(s) applied...." );
 
     ds.EnforceConstraints = true;
 
    }
 

What I need is to save the Data to Sql Server in respective table (Orders and OrderDetails) which my code can't seems to do it and it shows error that Foreign Key cannot be null...Because OrderDetails table also needs OrderID which is Foreign Key, and I am unable to understand how can I get the OrderID, as it is Auto generated after data is inserted in Database.
 
Please help me on this problem to save the data in database with this foreign key issue...
 
Any help will be much appreciated.
 
Thanks
 
Ahmed
AnswerRe: Insert Data to Master/Detail table in Sqlserver 2005 from C# with Foreign key in Detail tablememberEddy Vluggen8-Dec-12 2:49 
ahmed_one wrote:
and I am unable to understand how can I get the OrderID, as it is Auto generated after data is inserted in Database.

You could select the last identity[^].
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]
They hate us for our freedom![^]

GeneralRe: Insert Data to Master/Detail table in Sqlserver 2005 from C# with Foreign key in Detail tablememberahmed_one8-Dec-12 22:55 
Thanks for reply,
 
My problem is OrderID is not generated because of error that child table is not saved..the whole save procedure is failed because of this and compiler shows the error.
GeneralRe: Insert Data to Master/Detail table in Sqlserver 2005 from C# with Foreign key in Detail tablememberEddy Vluggen8-Dec-12 23:59 
ahmed_one wrote:
My problem is OrderID is not generated because of error that child table is not saved..

Save the Order first, fetch the identity, save the child-records.
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]
They hate us for our freedom![^]

QuestionContinuous listening of COM port for detecting MODEM??membershubhamjoshi7-Dec-12 19:59 
How will i continuous listen to COM for detecting modem.
if a modem is added or removed it should inform you that Modem installed or removed at COM45 etc.
 
I have tried to use a thread and check the com count but i am unable to know which com is modem.
 
If there is any specific class for this pls help me fr the code asap???
AnswerRe: Continuous listening of COM port for detecting MODEM??membervr9999999998-Dec-12 1:08 
u can use timer .
GeneralRe: Continuous listening of COM port for detecting MODEM??memberMycroft Holmes8-Dec-12 1:42 
You can use a keyboard!
Never underestimate the power of human stupidity
RAH

AnswerRe: Continuous listening of COM port for detecting MODEM??memberAndy41111-Dec-12 1:51 
I'm not sure if I understand you: You want to iterate through all COM-Ports to detect, if a modem is connected?
 
You can open each COM-Port, send the command "AT" and wait if you get an "OK" as answer. Then you know, that there is a modem.
Questionreturning the largest int variablememberRichB377-Dec-12 12:54 
What is the most efficient way of returning or finding the largest int variable from an object. For example, object A has many int variables. I am just wandering is there a way to iterate through an object's variables without resorting to a long and drawn out if statement.
AnswerRe: returning the largest int variablememberPIEBALDconsult7-Dec-12 14:15 
That depends on the object. Is it a collection of ints? Or will you have to use Reflection to find the members?
GeneralRe: returning the largest int variablememberRichB377-Dec-12 15:00 
It's just a standard object with int properties; no collections. As a new programmer, not sure what reflection actually is.
GeneralRe: returning the largest int variablememberZac Greve7-Dec-12 17:03 
Here[^] is some more information on reflection.

Bob Dole
The internet is a great way to get on the net.

D'Oh! | :doh: 2.0.82.7292 SP6a

AnswerRe: returning the largest int variablemvpDave Kreskowiak7-Dec-12 18:41 
Wouldn't it have been better to hold the values in an array or collection instead of discrete variables??

GeneralRe: returning the largest int variablememberRichB377-Dec-12 18:51 
Yeah, I just realized that after reading up on the whole reflection bit, lol. Thanks.
AnswerRe: returning the largest int variablememberCommDev8-Dec-12 23:52 
Hi,
 
I think n-1 times consideration is the best way in one loop.
Is there any other better idea?
 

 
Thanks,
CommDev
Live Support Software for Business Smile | :)
QuestionManual serialization of a class that contains the same classmembernadavst7-Dec-12 11:34 
Hi,
 
I would like to serialize a class (Person),
That contains a field called "Spouse", of the same type(Person).
 
I'm having a bit of problem doing that because I don't know
when to stop writing.
 
I'm trying to do it manualy, not with XmlSerializer BinaryFormatter ect.
 
BTW
when I do try to serialize with the classes mentioned above, XmlSerializer - works fine only when I'm not serialize "Spouse" field.
with BinaryFormatter it works well.
 
public class Person
{
        public int Age { get; set; }
        public FullName Name { get; set; }
        public Address Address { get; set; }
        public Person Spouse { get; set; }
}

AnswerRe: Manual serialization of a class that contains the same classmvpRichard MacCutchan7-Dec-12 22:02 
I am assuming that you have two Person objects and the Spouse field of each object points to the other one. You just need to keep a note when serializing to stop on the second object when you reach the Spouse field.
One of these days I'm going to think of a really clever signature.

GeneralRe: Manual serialization of a class that contains the same classmembernadavst7-Dec-12 23:23 
Hi Richard, and thanks for you quick answer.
what I'm trying to do is to save one Person object and because Spouse Field I need to save another Person object.
 
My serialize method should be generic, not specific to Persons objects, and therefore I don't know when to stop writing.
 
The method signature:
public static void Serialize<T>(T o, Stream stream)
 
a little brief of what i have done so far in this method:
by using reflection,whice means using:
Type.GetType(obj.Tostring());
GetProperties();
I'm scaning the props and each time a prop is not Primitive
type I'm doing the recursive call with this prop as a first parameter - it works well.
coming back to "stop writing issue" whice i dont know the generically solution for it.
 
Thanks.
GeneralRe: Manual serialization of a class that contains the same classmvpRichard MacCutchan8-Dec-12 22:20 
This becomes more difficult if you do not know the structure of the objects, as you would have to check each property to see if it refers to an object of the type that is being serialised. Then you need to decide whether to serialize it at that point, or assume that it will be found and serialised elsewhere.
One of these days I'm going to think of a really clever signature.

GeneralRe: Manual serialization of a class that contains the same classmembernadavst9-Dec-12 20:53 
Ok, I think I have an idea how to do it
Thanks.
AnswerRe: Manual serialization of a class that contains the same classmemberlukeer9-Dec-12 20:54 
The BinaryFormatter[^], and the SoapFormatter[^] too, use references. An object is serialized and a reference is generated for that serialization. Whenever that same object occurs again, only the reference is added to the serialization.
 
Change BinaryFormatter to SoapFormatter in an example and look at the output. It's some sort of XML, which you can (hardly) read as a human, and get the point from there.

Ciao,
 

luker

GeneralRe: Manual serialization of a class that contains the same classmembernadavst9-Dec-12 23:17 
I did this with the SoapFormmater and the output that i got is somthing like this:
<SOAP-ENV:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:clr="http://schemas.microsoft.com/soap/encoding/clr/1.0" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<a1:Person id="ref-1" xmlns:a1="http://schemas.microsoft.com/clr/nsassem/SerializeImp/SerializeImp%2C%20Version%3D1.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull">
<_x003C_Age_x003E_k__BackingField>35</_x003C_Age_x003E_k__BackingField>
<_x003C_Name_x003E_k__BackingField href="#ref-3"/>
<_x003C_Address_x003E_k__BackingField href="#ref-4"/>
<_x003C_Spouse_x003E_k__BackingField href="#ref-5"/>
</a1:Person>
<a1:FullName id="ref-3" xmlns:a1="http://schemas.microsoft.com/clr/nsassem/SerializeImp/SerializeImp%2C%20Version%3D1.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull">
<_firstName id="ref-6">Alice</_firstName>
<_lastName id="ref-7">Jones</_lastName>
</a1:FullName>
<a1:Address id="ref-4" xmlns:a1="http://schemas.microsoft.com/clr/nsassem/SerializeImp/SerializeImp%2C%20Version%3D1.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull">
<_x003C_Street_x003E_k__BackingField id="ref-8">Lincoln 10</_x003C_Street_x003E_k__BackingField>
<_x003C_City_x003E_k__BackingField id="ref-9">New york</_x003C_City_x003E_k__BackingField>
<_x003C_ZipCode_x003E_k__BackingField id="ref-10">5555</_x003C_ZipCode_x003E_k__BackingField>
<_x003C_PhoneNumber_x003E_k__BackingField id="ref-11">5555555</_x003C_PhoneNumber_x003E_k__BackingField>
</a1:Address>
<a1:Person id="ref-5" xmlns:a1="http://schemas.microsoft.com/clr/nsassem/SerializeImp/SerializeImp%2C%20Version%3D1.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull">
<_x003C_Age_x003E_k__BackingField>43</_x003C_Age_x003E_k__BackingField>
<_x003C_Name_x003E_k__BackingField href="#ref-12"/>
<_x003C_Address_x003E_k__BackingField href="#ref-4"/>
<_x003C_Spouse_x003E_k__BackingField href="#ref-1"/>
</a1:Person>
<a1:FullName id="ref-12" xmlns:a1="http://schemas.microsoft.com/clr/nsassem/SerializeImp/SerializeImp%2C%20Version%3D1.0.0.0%2C%20Culture%3Dneutral%2C%20PublicKeyToken%3Dnull">
<_firstName id="ref-13">Bob</_firstName>
<_lastName href="#ref-7"/>
</a1:FullName>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
 
so firstly every reference type object should be written with href attribute , and after that his values need to be written with
id attribute that the href's lead to them.
how do i do that, and then, how can I use this information with the Deserialize process?
AnswerRe: Manual serialization of a class that contains the same classmemberBobJanova9-Dec-12 22:53 
When you're going to serialise an object, check if you already have done, and if so, store only a reference the second time.
QuestionHow to pase the CCD (continuity Careof Document )in xml format to fetch that in dataset in ASP.NETmembershamalj7-Dec-12 3:50 
Hello guys
I want to parse the data which is xml format of CCD (continuity Care of Document)in asp.net 2005 but it's very large file so i am in trouble how to find the each node in XML file. it's very depth tree of XML
 

 

My XML file is
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="CCD.xsl"?>
<!-- The following sample document depicts a fictional character’s health summary. Any resemblance to a real person is coincidental. -->
<ClinicalDocument xmlns="urn:hl7-org:v3" xmlns:voc="urn:hl7-org:v3/voc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:hl7-org:v3 CDA.xsd">
    <!--
********************************************************
CDA Header
********************************************************
-->
    <typeID root="2.16.840.1.113883.1.3" extension="POCD_HD000040"/>
    <templateId root="2.16.840.1.113883.10.20.1"/> <!-- CCD v1.0 Templates Root -->
    <id root="db734647-fc99-424c-a864-7e3cda82e703"/>
    <code code="34133-9" codeSystem="2.16.840.1.113883.6.1" displayName="Summarization of episode note"/>
    <title>Good Health Clinic Continuity of Care Document</title>
    <effectiveTime value="20000407130000+0500"/>
    <confidentialityCode code="N" codeSystem="2.16.840.1.113883.5.25"/>
    <languageCode code="en-US"/>
    <recordTarget>
        <patientRole>
            <id extension="996-756-495" root="2.16.840.1.113883.19.5"/>
            <patient>
                <name>
                    <given representation="TXT" mediaType="text/plain" partType="GIV">Henry</given>
                    <family representation="TXT" mediaType="text/plain" partType="FAM">Levin</family>
                    <suffix representation="TXT" mediaType="text/plain" partType="SUF">the 7th</suffix>
                </name>
                <administrativeGenderCode code="M" codeSystem="2.16.840.1.113883.5.1"/>
                <birthTime value="19320924"/>
            </patient>
            <providerOrganization>
                <id root="2.16.840.1.113883.19.5"/>
                <name>Good Health Clinic</name>
            </providerOrganization>
        </patientRole>
    </recordTarget>
    <author>
        <time value="20000407130000+0500"/>
        <assignedAuthor>
            <id root="20cf14fb-b65c-4c8c-a54d-b0cca834c18c"/>
            <assignedPerson>
                <name><prefix>Dr.</prefix><given>Robert</given><family>Dolin</family></name>
            </assignedPerson>
            <representedOrganization>
                <id root="2.16.840.1.113883.19.5"/>
                <name>Good Health Clinic</name>
            </representedOrganization>
        </assignedAuthor>
    </author>
    <informant>
        <assignedEntity>
            <id nullFlavor="NI"/>
            <representedOrganization>
                <id root="2.16.840.1.113883.19.5"/>
                <name>Good Health Clinic</name>
            </representedOrganization>
        </assignedEntity>
    </informant>
    <custodian>
        <assignedCustodian>
            <representedCustodianOrganization>
                <id root="2.16.840.1.113883.19.5"/>
                <name>Good Health Clinic</name>
            </representedCustodianOrganization>
        </assignedCustodian>
    </custodian>
    <legalAuthenticator>
        <time value="20000407130000+0500"/>
        <signatureCode code="S"/>
        <assignedEntity>
            <id nullFlavor="NI"/>
            <representedOrganization>
                <id root="2.16.840.1.113883.19.5"/>
                <name>Good Health Clinic</name>
            </representedOrganization>
        </assignedEntity>
    </legalAuthenticator>
    <participant typeCode="IND">
        <associatedEntity classCode="GUAR">
            <id root="4ff51570-83a9-47b7-91f2-93ba30373141"/>
            <addr>
                <streetAddressLine>17 Daws Rd.</streetAddressLine>
                <city>Blue Bell</city>
                <state>MA</state>
                <postalCode>02368</postalCode>
            </addr>
            <telecom value="tel:(888)555-1212"/>
            <associatedPerson>
                <name>
                    <given>Kenneth</given>
                    <family>Ross</family>
                </name>
            </associatedPerson>
        </associatedEntity>
    </participant>
    <participant typeCode="IND">
        <associatedEntity classCode="NOK">
            <id root="4ac71514-6a10-4164-9715-f8d96af48e6d"/>
            <code code="65656005" codeSystem="2.16.840.1.113883.6.96" displayName="Biiological mother"/>
            <telecom value="tel:(999)555-1212"/>
            <associatedPerson>
                <name>
                    <given>Henrietta</given>
                    <family>Levin</family>
                </name>
            </associatedPerson>
        </associatedEntity>
    </participant>
    <documentationOf>
        <serviceEvent classCode="PCPR">
            <effectiveTime><low value="19320924"/><high value="20000407"/></effectiveTime>
            <performer typeCode="PRF">
                <functionCode code="PCP" codeSystem="2.16.840.1.113883.5.88"/>
                <time><low value="1990"/><high value='20000407'/></time>
                <assignedEntity>
                    <id root="20cf14fb-b65c-4c8c-a54d-b0cca834c18c"/>
                    <assignedPerson>
                        <name><prefix>Dr.</prefix><given>Robert</given><family>Dolin</family></name>
                    </assignedPerson>
                    <representedOrganization>
                        <id root="2.16.840.1.113883.19.5"/>
                        <name>Good Health Clinic</name>
                    </representedOrganization>
                </assignedEntity>
            </performer>
        </serviceEvent>
    </documentationOf>
    <!--
********************************************************
CDA Body
********************************************************
-->
    <component>
        <structuredBody>
                    <!--
********************************************************
Purpose section
********************************************************
-->
<component>
<section>
    <templateId root='2.16.840.1.113883.10.20.1.13'/> <!-- Purpose section template -->
    <code code="48764-5" codeSystem="2.16.840.1.113883.6.1"/>
    <title>Summary Purpose</title>
    <text>Transfer of care</text>
    <entry typeCode="DRIV">
        <act classCode="ACT" moodCode="EVN">
            <templateId root='2.16.840.1.113883.10.20.1.30'/> <!-- Purpose activity template -->
            <code code="23745001" codeSystem="2.16.840.1.113883.6.96" displayName="Documentation procedure"/>
            <statusCode code="completed"/>
            <entryRelationship typeCode="RSON">
                <act classCode="ACT" moodCode="EVN">
                    <code code="308292007" codeSystem="2.16.840.1.113883.6.96" displayName="Transfer of care"/>
                    <statusCode code="completed"/>
                </act>
            </entryRelationship>
        </act>
    </entry>
</section>
</component>
                    <!--
********************************************************
Payers section
********************************************************
-->
<component>
<section>
    <templateId root='2.16.840.1.113883.10.20.1.9'/> <!-- Payers section template -->
    <code code="48768-6" codeSystem="2.16.840.1.113883.6.1"/>
    <title>Payers</title>
    <text>
        <table border="1" width="100%">
            <thead>
            <tr><th>Payer name</th><th>Policy type / Coverage type</th><th>Covered party ID</th> <th>Authorization(s)</th></tr>
            </thead>
            <tbody>
                <tr>
                    <td>Good Health Insurance</td>
                    <td>Extended healthcare / Self</td>
                    <td>14d4a520-7aae-11db-9fe1-0800200c9a66</td>
                    <td>Colonoscopy</td>
                </tr>
            </tbody>
        </table>
    </text>
    <entry typeCode="DRIV">
        <act classCode="ACT" moodCode="DEF">
            <templateId root='2.16.840.1.113883.10.20.1.20'/> <!-- Coverage activity template -->
            <id root="1fe2cdd0-7aad-11db-9fe1-0800200c9a66"/>
            <code code="48768-6" codeSystem="2.16.840.1.113883.6.1" displayName="Payment sources"/>
            <statusCode code="completed"/>
            <entryRelationship typeCode="COMP">
                <act classCode="ACT" moodCode="EVN">
                    <templateId root='2.16.840.1.113883.10.20.1.26'/> <!-- Policy activity template -->
                    <id root="3e676a50-7aac-11db-9fe1-0800200c9a66"/>
                    <code code="EHCPOL" codeSystem="2.16.840.1.113883.5.4" displayName="Extended healthcare"/>
                    <statusCode code="completed"/>
                    <performer typeCode="PRF">
                        <assignedEntity>
                            <id root="329fcdf0-7ab3-11db-9fe1-0800200c9a66"/>
                            <representedOrganization>
                                <name>Good Health Insurance</name>
                            </representedOrganization>
                        </assignedEntity>
                    </performer>
                    <participant typeCode="COV">
                        <participantRole>
                            <id root="14d4a520-7aae-11db-9fe1-0800200c9a66"/>
                            <code code="SELF" codeSystem="2.16.840.1.113883.5.111" displayName="Self"/>
                        </participantRole>
                    </participant>
                    <entryRelationship typeCode="REFR">
                        <act classCode="ACT" moodCode="EVN">
                            <templateId root='2.16.840.1.113883.10.20.1.19'/> <!-- Authorization activity template -->
                            <id root="f4dce790-8328-11db-9fe1-0800200c9a66"/>
                            <code nullFlavor="NA"/>
                            <entryRelationship typeCode="SUBJ">
                                <procedure classCode="PROC" moodCode="PRMS">
                                    <code code="73761001" codeSystem="2.16.840.1.113883.6.96" displayName="Colonoscopy"/>
                                </procedure>
                            </entryRelationship>
                        </act>
                    </entryRelationship>
                </act>
            </entryRelationship>
        </act>
    </entry>
</section>
</component>
                    <!--
********************************************************
Advance Directives section
********************************************************
-->
<component>
<section>
    <templateId root='2.16.840.1.113883.10.20.1.1'/> <!-- Advance directives section template -->
    <code code="42348-3" codeSystem="2.16.840.1.113883.6.1"/>
    <title>Advance Directives</title>
    <text>
        <table border="1" width="100%">
            <thead>
            <tr><th>Directive</th><th>Description</th><th>Verification</th><th>Supporting Document(s)</th></tr>
            </thead>
            <tbody>
                <tr>
                    <td>Resuscitation status</td>
                    <td><content ID="AD1">Do not resuscitate</content></td>
                    <td>Dr. Robert Dolin, Nov 07, 1999</td>
                    <td><linkHtml href="AdvanceDirective.b50b7910-7ffb-4f4c-bbe4-177ed68cbbf3.pdf">Advance directive</linkHtml></td>
                </tr>
            </tbody>
        </table>
    </text>
    <entry typeCode="DRIV">
        <observation classCode="OBS" moodCode="EVN">
            <templateId root='2.16.840.1.113883.10.20.1.17'/> <!-- Advance directive observation template -->
            <id root="9b54c3c9-1673-49c7-aef9-b037ed72ed27"/>
            <code code="304251008" codeSystem="2.16.840.1.113883.6.96" displayName="Resuscitation"/>
            <statusCode code="completed"/>
            <value xsi:type="CD" code="304253006" codeSystem="2.16.840.1.113883.6.96" displayName="Do not resuscitate">
                <originalText><reference value="#AD1"/></originalText>
            </value>
            <participant typeCode="VRF">
                <templateId root='2.16.840.1.113883.10.20.1.58'/> <!-- Verification of an advance directive observation template -->
                <time value="19991107"/>
                <participantRole>
                    <id root="20cf14fb-b65c-4c8c-a54d-b0cca834c18c"/>
                </participantRole>
            </participant>
            <entryRelationship typeCode="REFR">
                <observation classCode="OBS" moodCode="EVN">
                    <templateId root='2.16.840.1.113883.10.20.1.37'/> <!-- Advance directive status observation template -->
                    <code code="33999-4" codeSystem="2.16.840.1.113883.6.1" displayName="Status"/>
                    <statusCode code="completed"/>
                    <value xsi:type="CE" code="15240007" codeSystem="2.16.840.1.113883.6.96" displayName="Current and verified"/>
                </observation>
            </entryRelationship>
            <reference typeCode="REFR">
                <externalDocument>
                    <templateId root='2.16.840.1.113883.10.20.1.36'/> <!-- Advance directive reference template -->
                    <id root="b50b7910-7ffb-4f4c-bbe4-177ed68cbbf3"/>
                    <code code="371538006" codeSystem="2.16.840.1.113883.6.96" displayName="Advance directive"/>
                    <text mediaType="application/pdf"><reference value="AdvanceDirective.b50b7910-7ffb-4f4c-bbe4-177ed68cbbf3.pdf"/></text>
                </externalDocument>
            </reference>
        </observation>
    </entry>
</section>
</component>
                    <!--
********************************************************
Functional Status section
********************************************************
-->
<component>
<section>
    <templateId root='2.16.840.1.113883.10.20.1.5'/> <!-- Functional status section template -->
    <code code="47420-5" codeSystem="2.16.840.1.113883.6.1"/>
    <title>Functional Status</title>
    <text>
        <table border="1" width="100%">
            <thead>
            <tr><th>Functional Condition</th> <th>Effective Dates</th> <th>Condition Status</th></tr>
            </thead>
            <tbody>
            <tr><td>Dependence on cane</td><td>1998</td><td>Active</td></tr>
            <tr><td>Memory impairment</td><td>1999</td><td>Active</td></tr>
            </tbody>
        </table>
    </text>
    <entry typeCode="DRIV">
        <act classCode="ACT" moodCode="EVN">
            <templateId root='2.16.840.1.113883.10.20.1.27'/> <!-- Problem act template -->
            <id root="6z2fa88d-4174-4909-aece-db44b60a3abb"/>
            <code nullFlavor="NA"/>
            <entryRelationship typeCode="SUBJ">
                <observation classCode="OBS" moodCode="EVN">
                    <templateId root='2.16.840.1.113883.10.20.1.28'/> <!-- Problem observation template -->
                    <id root="fd07111a-b15b-4dce-8518-1274d07f142a"/>
                    <code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
                    <statusCode code="completed"/>
                    <effectiveTime><low value="1998"/></effectiveTime>
                    <value xsi:type="CD" code="105504002" codeSystem="2.16.840.1.113883.6.96" displayName="Dependence on cane"/>
                    <entryRelationship typeCode="REFR">
                        <observation classCode="OBS" moodCode="EVN">
                            <templateId root='2.16.840.1.113883.10.20.1.44'/> <!-- Status of functional status observation template -->
                            <code code="33999-4" codeSystem="2.16.840.1.113883.6.1" displayName="Status"/>
                            <statusCode code="completed"/>
                            <value xsi:type="CE" code="55561003" codeSystem="2.16.840.1.113883.6.96" displayName="Active"/>
                        </observation>
                    </entryRelationship>
                </observation>
            </entryRelationship>
        </act>
    </entry>
    <entry typeCode="DRIV">
        <act classCode="ACT" moodCode="EVN">
            <templateId root='2.16.840.1.113883.10.20.1.27'/> <!-- Problem act template -->
            <id root="64606e86-c080-11db-8314-0800200c9a66"/>
            <code nullFlavor="NA"/>
            <entryRelationship typeCode="SUBJ">
                <observation classCode="OBS" moodCode="EVN">
                    <templateId root='2.16.840.1.113883.10.20.1.28'/> <!-- Problem observation template -->
                    <id root="6be2930a-c080-11db-8314-0800200c9a66"/>
                    <code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
                    <statusCode code="completed"/>
                    <effectiveTime><low value="1999"/></effectiveTime>
                    <value xsi:type="CD" code="386807006" codeSystem="2.16.840.1.113883.6.96" displayName="Memory impairment"/>
                    <entryRelationship typeCode="REFR">
                        <observation classCode="OBS" moodCode="EVN">
                            <templateId root='2.16.840.1.113883.10.20.1.44'/> <!-- Status of functional status observation template -->
                            <code code="33999-4" codeSystem="2.16.840.1.113883.6.1" displayName="Status"/>
                            <statusCode code="completed"/>
                            <value xsi:type="CE" code="55561003" codeSystem="2.16.840.1.113883.6.96" displayName="Active"/>
                        </observation>
                    </entryRelationship>
                </observation>
            </entryRelationship>
        </act>
    </entry>
</section>
</component>
            <!--
********************************************************
Problems section
********************************************************
-->
<component>
<section>
    <templateId root='2.16.840.1.113883.10.20.1.11'/> <!-- Problem section template -->
    <code code="11450-4" codeSystem="2.16.840.1.113883.6.1"/>
    <title>Problems</title>
    <text>
        <table border="1" width="100%">
            <thead>
                <tr><th>Condition</th><th>Effective Dates</th><th>Condition Status</th></tr>
            </thead>
            <tbody>
                <tr><td>Asthma</td><td>1950</td><td>Active</td></tr>
                <tr><td>Pneumonia</td><td>Jan 1997</td><td>Resolved</td></tr>
                <tr><td>"</td><td>Mar 1999</td><td>Resolved</td></tr>
                <tr><td>Myocardial Infarction</td><td>Jan 1997</td><td>Resolved</td></tr>
            </tbody>
        </table>
    </text>
    <entry typeCode="DRIV">
        <act classCode="ACT" moodCode="EVN">
            <templateId root='2.16.840.1.113883.10.20.1.27'/> <!-- Problem act template -->
            <id root="6a2fa88d-4174-4909-aece-db44b60a3abb"/>
            <code nullFlavor="NA"/>
            <entryRelationship typeCode="SUBJ">
                <observation classCode="OBS" moodCode="EVN">
                    <templateId root='2.16.840.1.113883.10.20.1.28'/> <!-- Problem observation template -->
                    <id root="d11275e7-67ae-11db-bd13-0800200c9a66"/>
                    <code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
                    <statusCode code="completed"/>
                    <effectiveTime><low value="1950"/></effectiveTime>
                    <value xsi:type="CD" code="195967001" codeSystem="2.16.840.1.113883.6.96" displayName="Asthma"/>
                    <entryRelationship typeCode="REFR">
                        <observation classCode="OBS" moodCode="EVN">
                            <templateId root='2.16.840.1.113883.10.20.1.50'/> <!-- Problem status observation template -->
                            <code code="33999-4" codeSystem="2.16.840.1.113883.6.1" displayName="Status"/>
                            <statusCode code="completed"/>
                            <value xsi:type="CE" code="55561003" codeSystem="2.16.840.1.113883.6.96" displayName="Active"/>
                        </observation>
                    </entryRelationship>
                </observation>
            </entryRelationship>
        </act>
    </entry>
    <entry typeCode="DRIV">
        <act classCode="ACT" moodCode="EVN">
            <templateId root='2.16.840.1.113883.10.20.1.27'/> <!-- Problem act template -->
            <id root="ec8a6ff8-ed4b-4f7e-82c3-e98e58b45de7"/>
            <code nullFlavor="NA"/>
            <entryRelationship typeCode="SUBJ">
                <observation classCode="OBS" moodCode="EVN">
                    <templateId root='2.16.840.1.113883.10.20.1.28'/> <!-- Problem observation template -->
                    <id root="ab1791b0-5c71-11db-b0de-0800200c9a66"/>
                    <code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
                    <statusCode code="completed"/>
                    <effectiveTime><low value="199701"/></effectiveTime>
                    <value xsi:type="CD" code="233604007" codeSystem="2.16.840.1.113883.6.96" displayName="Pneumonia"/>
                    <entryRelationship typeCode="REFR">
                        <observation classCode="OBS" moodCode="EVN">
                            <templateId root='2.16.840.1.113883.10.20.1.50'/> <!-- Problem status observation template -->
                            <code code="33999-4" codeSystem="2.16.840.1.113883.6.1" displayName="Status"/>
                            <statusCode code="completed"/>
                            <value xsi:type="CE" code="413322009" codeSystem="2.16.840.1.113883.6.96" displayName="Resolved"/>
                        </observation>
                    </entryRelationship>
                </observation>
            </entryRelationship>
        </act>
    </entry>
    <entry typeCode="DRIV">
        <act classCode="ACT" moodCode="EVN">
            <templateId root='2.16.840.1.113883.10.20.1.27'/> <!-- Problem act template -->
            <id root="d11275e9-67ae-11db-bd13-0800200c9a66"/>
            <code nullFlavor="NA"/>
            <entryRelationship typeCode="SUBJ">
                <observation classCode="OBS" moodCode="EVN">
                    <templateId root='2.16.840.1.113883.10.20.1.28'/> <!-- Problem observation template -->
                    <id root="9d3d416d-45ab-4da1-912f-4583e0632000"/>
                    <code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
                    <statusCode code="completed"/>
                    <effectiveTime><low value="199903"/></effectiveTime>
                    <value xsi:type="CD" code="233604007" codeSystem="2.16.840.1.113883.6.96" displayName="Pneumonia"/>
                    <entryRelationship typeCode="REFR">
                        <observation classCode="OBS" moodCode="EVN">
                            <templateId root='2.16.840.1.113883.10.20.1.50'/> <!-- Problem status observation template -->
                            <code code="33999-4" codeSystem="2.16.840.1.113883.6.1" displayName="Status"/>
                            <statusCode code="completed"/>
                            <value xsi:type="CE" code="413322009" codeSystem="2.16.840.1.113883.6.96" displayName="Resolved"/>
                        </observation>
                    </entryRelationship>
                </observation>
            </entryRelationship>
            <entryRelationship typeCode="SUBJ" inversionInd="true">
                <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.1.41"/> <!-- Episode observation template -->
                    <code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
                    <statusCode code="completed"/>
                    <value xsi:type="CD" code="404684003" codeSystem="2.16.840.1.113883.6.96" displayName="Clinical finding">
                        <qualifier>
                            <name code="246456000" displayName="Episodicity"/>
                            <value code="288527008" displayName="New episode"/>
                        </qualifier>
                    </value>
                    <entryRelationship typeCode="SAS">
                        <act classCode="ACT" moodCode="EVN">
                            <id root="ec8a6ff8-ed4b-4f7e-82c3-e98e58b45de7"/>
                            <code nullFlavor="NA"/>
                        </act>
                    </entryRelationship>
                </observation>
            </entryRelationship>
        </act>
    </entry>
    <entry typeCode="DRIV">
        <act classCode="ACT" moodCode="EVN">
            <templateId root='2.16.840.1.113883.10.20.1.27'/> <!-- Problem act template -->
            <id root="5a2c903c-bd77-4bd1-ad9d-452383fbfefa"/>
            <code nullFlavor="NA"/>
            <entryRelationship typeCode="SUBJ">
                <observation classCode="OBS" moodCode="EVN">
                    <templateId root='2.16.840.1.113883.10.20.1.28'/> <!-- Problem observation template -->
                    <code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
                    <statusCode code="completed"/>
                    <effectiveTime><low value="199701"/></effectiveTime>
                    <value xsi:type="CD" code="22298006" codeSystem="2.16.840.1.113883.6.96" displayName="Myocardial infarction"/>
                    <entryRelationship typeCode="REFR">
                        <observation classCode="OBS" moodCode="EVN">
                            <templateId root='2.16.840.1.113883.10.20.1.50'/> <!-- Problem status observation template -->
                            <code code="33999-4" codeSystem="2.16.840.1.113883.6.1" displayName="Status"/>
                            <statusCode code="completed"/>
                            <value xsi:type="CE" code="413322009" codeSystem="2.16.840.1.113883.6.96" displayName="Resolved"/>
                        </observation>
                    </entryRelationship>
                </observation>
            </entryRelationship>
        </act>
    </entry>
</section>
</component>
            <!--
********************************************************
Family History section
********************************************************
-->
<component>
<section>
    <templateId root="2.16.840.1.113883.10.20.1.4"/> <!-- Family history section template -->
    <code code="10157-6" codeSystem="2.16.840.1.113883.6.1"/>
    <title>Family history</title>
    <text>
        <paragraph>Father (deceased)</paragraph>
        <table border="1" width="100%">
            <thead>
                <tr><th>Diagnosis</th><th>Age At Onset</th></tr>
            </thead>
            <tbody>
                <tr><td>Myocardial Infarction (cause of death)</td><td>57</td></tr>
                <tr><td>Hypertension</td><td>40</td></tr>
            </tbody>
        </table>
        <paragraph>Mother (alive)</paragraph>
        <table border="1" width="100%">
            <thead>
                <tr><th>Diagnosis</th><th>Age At Onset</th></tr>
            </thead>
            <tbody>
                <tr><td>Asthma</td><td>30</td></tr>
            </tbody>
        </table>
    </text>
    <entry typeCode="DRIV">
        <organizer moodCode="EVN" classCode="CLUSTER">
            <templateId root="2.16.840.1.113883.10.20.1.23"/> <!-- Family history organizer template -->
            <statusCode code="completed"/>
            <subject>
                <relatedSubject classCode="PRS">
                    <code code="9947008" codeSystem="2.16.840.1.113883.6.96" displayName="Biological father"/>
                    <subject>
                        <administrativeGenderCode code="M" codeSystem="2.16.840.1.113883.5.1" displayName="Male"/>
                        <birthTime value="1912"/>
                    </subject>
                </relatedSubject>
            </subject>
            <component>
                <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.1.42"/> <!-- Family history cause of death observation template -->
                    <id root="d42ebf70-5c89-11db-b0de-0800200c9a66"/>
                    <code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
                    <statusCode code="completed"/>
                    <value xsi:type="CD" code="22298006" codeSystem="2.16.840.1.113883.6.96" displayName="MI"/>
                    <entryRelationship typeCode="CAUS">
                        <observation classCode="OBS" moodCode="EVN">
                            <id root="6898fae0-5c8a-11db-b0de-0800200c9a66"/>
                            <code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
                            <statusCode code="completed"/>
                            <value xsi:type="CD" code="419099009" codeSystem="2.16.840.1.113883.6.96" displayName="Dead"/>
                        </observation>
                    </entryRelationship>
                    <entryRelationship typeCode="SUBJ" inversionInd="true">
                        <observation classCode="OBS" moodCode="EVN">
                            <templateId root="2.16.840.1.113883.10.20.1.38"/> <!-- Age observation template -->
                            <code code="397659008" codeSystem="2.16.840.1.113883.6.96" displayName="Age"/>
                            <statusCode code="completed"/>
                            <value xsi:type="INT" value="57"/>
                        </observation>
                    </entryRelationship>
                </observation>
            </component>
            <component>
                <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.1.22"/> <!-- Family history observation template -->
                    <id root="5bfe3ec0-5c8b-11db-b0de-0800200c9a66"/>
                    <code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
                    <statusCode code="completed"/>
                    <value xsi:type="CD" code="59621000" codeSystem="2.16.840.1.113883.6.96" displayName="HTN"/>
                    <entryRelationship typeCode="SUBJ" inversionInd="true">
                        <observation classCode="OBS" moodCode="EVN">
                            <templateId root="2.16.840.1.113883.10.20.1.38"/> <!-- Age observation template -->
                            <code code="397659008" codeSystem="2.16.840.1.113883.6.96" displayName="Age"/>
                            <statusCode code="completed"/>
                            <value xsi:type="INT" value="40"/>
                        </observation>
                    </entryRelationship>
                </observation>
            </component>
        </organizer>
    </entry>
    <entry typeCode="DRIV">
        <organizer moodCode="EVN" classCode="CLUSTER">
            <templateId root="2.16.840.1.113883.10.20.1.23"/> <!-- Family history organizer template -->
            <statusCode code="completed"/>
            <subject>
                <relatedSubject classCode="PRS">
                    <code code="65656005" codeSystem="2.16.840.1.113883.6.96" displayName="Biological mother"/>
                    <subject>
                        <administrativeGenderCode code="F" codeSystem="2.16.840.1.113883.5.1" displayName="Female"/>
                        <birthTime value="1912"/>
                    </subject>
                </relatedSubject>
            </subject>
            <component>
                <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.1.22"/> <!-- Family history observation template -->
                    <id root="a13c6160-5c8b-11db-b0de-0800200c9a66"/>
                    <code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
                    <statusCode code="completed"/>
                    <effectiveTime>
                        <low value="1942"/>
                    </effectiveTime>
                    <value xsi:type="CD" code="195967001" codeSystem="2.16.840.1.113883.6.96" displayName="Asthma"/>
                </observation>
            </component>
        </organizer>
    </entry>
</section>
</component>
            <!--
********************************************************
Social History section
********************************************************
-->
<component>
<section>
    <templateId root="2.16.840.1.113883.10.20.1.15"/> <!-- Social history section template -->
    <code code="29762-2" codeSystem="2.16.840.1.113883.6.1"/>
    <title>Social History</title>
    <text>
        <table border="1" width="100%">
            <thead>
                <tr><th>Social History Element</th><th>Description</th><th>Effective Dates</th></tr>
            </thead>
            <tbody>
                <tr><td>Cigarette smoking</td><td>1 pack per day</td><td>1947 - 1972</td></tr>
                <tr><td>"</td><td>None</td><td>1973 - </td></tr>
                <tr><td>Alcohol consumption</td><td>None</td><td>1973 - </td></tr>
            </tbody>
        </table>
    </text>
    <entry typeCode="DRIV">
        <observation classCode="OBS" moodCode="EVN">
            <templateId root="2.16.840.1.113883.10.20.1.33"/> <!-- Social history observation template -->
            <id root="9b56c25d-9104-45ee-9fa4-e0f3afaa01c1"/>
            <code code="230056004" codeSystem="2.16.840.1.113883.6.96" displayName="Cigarette smoking"/>
            <statusCode code="completed"/>
            <effectiveTime><low value="1947"/><high value="1972"/></effectiveTime>
            <value xsi:type="ST">1 pack per day</value>
        </observation>
    </entry>
    <entry typeCode="DRIV">
        <observation classCode="OBS" moodCode="EVN">
            <templateId root="2.16.840.1.113883.10.20.1.33"/> <!-- Social history observation template -->
            <id root="45efb604-7049-4a2e-ad33-d38556c9636c"/>
            <code code="230056004" codeSystem="2.16.840.1.113883.6.96" displayName="Cigarette smoking"/>
            <statusCode code="completed"/>
            <effectiveTime><low value="1973"/></effectiveTime>
            <value xsi:type="ST">None</value>
            <entryRelationship typeCode="SUBJ" inversionInd="true">
                <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.1.41"/> <!-- Episode observation template -->
                    <code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
                    <statusCode code="completed"/>
                    <value xsi:type="CD" code="404684003" codeSystem="2.16.840.1.113883.6.96" displayName="Clinical finding">
                        <qualifier>
                            <name code="246456000" displayName="Episodicity"/>
                            <value code="288527008" displayName="New episode"/>
                        </qualifier>
                    </value>
                    <entryRelationship typeCode="SAS">
                        <observation classCode="OBS" moodCode="EVN">
                            <id root="9b56c25d-9104-45ee-9fa4-e0f3afaa01c1"/>
                            <code code="230056004" codeSystem="2.16.840.1.113883.6.96" displayName="Cigarette smoking"/>
                        </observation>
                    </entryRelationship>
                </observation>
            </entryRelationship>
        </observation>
    </entry>
    <entry typeCode="DRIV">
        <observation classCode="OBS" moodCode="EVN">
            <templateId root="2.16.840.1.113883.10.20.1.33"/> <!-- Social history observation template -->
            <id root="37f76c51-6411-4e1d-8a37-957fd49d2cef"/>
            <code code="160573003" codeSystem="2.16.840.1.113883.6.96" displayName="Alcohol consumption"/>
            <statusCode code="completed"/>
            <effectiveTime><low value="1973"/></effectiveTime>
            <value xsi:type="ST">None</value>
        </observation>
    </entry>
</section>
</component>
            <!--
********************************************************
Alerts section
********************************************************
-->
<component>
<section>
    <templateId root="2.16.840.1.113883.10.20.1.2"/> <!-- Alerts section template -->
    <code code="48765-2" codeSystem="2.16.840.1.113883.6.1"/>
    <title>Allergies, Adverse Reactions, Alerts</title>
    <text>
        <table border="1" width="100%">
            <thead>
                <tr><th>Substance</th><th>Reaction</th><th>Status</th></tr>
            </thead>
            <tbody>
                <tr><td>Penicillin</td><td>Hives</td><td>Active</td></tr>
                <tr><td>Aspirin</td><td>Wheezing</td><td>Active</td></tr>
                <tr><td>Codeine</td><td>Nausea</td><td>Active</td></tr>
            </tbody>
        </table>
    </text>
    <entry typeCode="DRIV">
        <act classCode="ACT" moodCode="EVN">
            <templateId root='2.16.840.1.113883.10.20.1.27'/> <!-- Problem act template -->
            <id root="36e3e930-7b14-11db-9fe1-0800200c9a66"/>
            <code nullFlavor="NA"/>
            <entryRelationship typeCode="SUBJ">
                <observation classCode="OBS" moodCode="EVN">
                    <templateId root='2.16.840.1.113883.10.20.1.18'/> <!-- Alert observation template -->
                    <id root="4adc1020-7b14-11db-9fe1-0800200c9a66"/>
                    <code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
                    <statusCode code="completed"/>
                    <value xsi:type="CD" code="282100009" codeSystem="2.16.840.1.113883.6.96" displayName="Adverse reaction to substance"/>
                    <participant typeCode="CSM">
                        <participantRole classCode="MANU">
                            <playingEntity classCode="MMAT">
                                <code code="70618" codeSystem="2.16.840.1.113883.6.88"  displayName="Penicillin"/>
                            </playingEntity>
                        </participantRole>
                    </participant>
                    <entryRelationship typeCode="MFST" inversionInd="true">
                        <observation classCode="OBS" moodCode="EVN">
                            <templateId root='2.16.840.1.113883.10.20.1.54'/> <!-- Reaction observation template -->
                            <code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
                            <statusCode code="completed"/>
                            <value xsi:type="CD" code="247472004" codeSystem="2.16.840.1.113883.6.96" displayName="Hives"/>
                        </observation>
                    </entryRelationship>
                    <entryRelationship typeCode="REFR">
                        <observation classCode="OBS" moodCode="EVN">
                            <templateId root='2.16.840.1.113883.10.20.1.39'/> <!-- Alert status observation template -->
                            <code code="33999-4" codeSystem="2.16.840.1.113883.6.1" displayName="Status"/>
                            <statusCode code="completed"/>
                            <value xsi:type="CE" code="55561003" codeSystem="2.16.840.1.113883.6.96" displayName="Active"/>
                        </observation>
                    </entryRelationship>
                </observation>
            </entryRelationship>
        </act>
    </entry>
    <entry typeCode="DRIV">
        <act classCode="ACT" moodCode="EVN">
            <templateId root='2.16.840.1.113883.10.20.1.27'/> <!-- Problem act template -->
            <id root="eb936010-7b17-11db-9fe1-0800200c9a66"/>
            <code nullFlavor="NA"/>
            <entryRelationship typeCode="SUBJ">
                <observation classCode="OBS" moodCode="EVN">
                    <templateId root='2.16.840.1.113883.10.20.1.18'/> <!-- Alert observation template -->
                    <id root="eb936011-7b17-11db-9fe1-0800200c9a66"/>
                    <code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
                    <statusCode code="completed"/>
                    <value xsi:type="CD" code="282100009" codeSystem="2.16.840.1.113883.6.96" displayName="Adverse reaction to substance"/>
                    <participant typeCode="CSM">
                        <participantRole classCode="MANU">
                            <playingEntity classCode="MMAT">
                                <code code="1191" codeSystem="2.16.840.1.113883.6.88"  displayName="Aspirin"/>
                            </playingEntity>
                        </participantRole>
                    </participant>
                    <entryRelationship typeCode="MFST" inversionInd="true">
                        <observation classCode="OBS" moodCode="EVN">
                            <templateId root='2.16.840.1.113883.10.20.1.54'/> <!-- Reaction observation template -->
                            <code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
                            <statusCode code="completed"/>
                            <value xsi:type="CD" code="56018004" codeSystem="2.16.840.1.113883.6.96" displayName="Wheezing"/>
                        </observation>
                    </entryRelationship>
                    <entryRelationship typeCode="REFR">
                        <observation classCode="OBS" moodCode="EVN">
                            <templateId root='2.16.840.1.113883.10.20.1.39'/> <!-- Alert status observation template -->
                            <code code="33999-4" codeSystem="2.16.840.1.113883.6.1" displayName="Status"/>
                            <statusCode code="completed"/>
                            <value xsi:type="CE" code="55561003" codeSystem="2.16.840.1.113883.6.96" displayName="Active"/>
                        </observation>
                    </entryRelationship>
                </observation>
            </entryRelationship>
        </act>
    </entry>
    <entry typeCode="DRIV">
        <act classCode="ACT" moodCode="EVN">
            <templateId root='2.16.840.1.113883.10.20.1.27'/> <!-- Problem act template -->
            <id root="c3df3b61-7b18-11db-9fe1-0800200c9a66"/>
            <code nullFlavor="NA"/>
            <entryRelationship typeCode="SUBJ">
                <observation classCode="OBS" moodCode="EVN">
                    <templateId root='2.16.840.1.113883.10.20.1.18'/> <!-- Alert observation template -->
                    <id root="c3df3b60-7b18-11db-9fe1-0800200c9a66"/>
                    <code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
                    <statusCode code="completed"/>
                    <value xsi:type="CD" code="282100009" codeSystem="2.16.840.1.113883.6.96" displayName="Adverse reaction to substance"/>
                    <participant typeCode="CSM">
                        <participantRole classCode="MANU">
                            <playingEntity classCode="MMAT">
                                <code code="2670" codeSystem="2.16.840.1.113883.6.88"  displayName="Codeine"/>
                            </playingEntity>
                        </participantRole>
                    </participant>
                    <entryRelationship typeCode="MFST" inversionInd="true">
                        <observation classCode="OBS" moodCode="EVN">
                            <templateId root='2.16.840.1.113883.10.20.1.54'/> <!-- Reaction observation template -->
                            <code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
                            <statusCode code="completed"/>
                            <value xsi:type="CD" code="73879007" codeSystem="2.16.840.1.113883.6.96" displayName="Nausea"/>
                        </observation>
                    </entryRelationship>
                    <entryRelationship typeCode="REFR">
                        <observation classCode="OBS" moodCode="EVN">
                            <templateId root='2.16.840.1.113883.10.20.1.39'/> <!-- Alert status observation template -->
                            <code code="33999-4" codeSystem="2.16.840.1.113883.6.1" displayName="Status"/>
                            <statusCode code="completed"/>
                            <value xsi:type="CE" code="55561003" codeSystem="2.16.840.1.113883.6.96" displayName="Active"/>
                        </observation>
                    </entryRelationship>
                </observation>
            </entryRelationship>
        </act>
    </entry>
</section>
</component>
            <!--
********************************************************
Medications section
********************************************************
-->
<component>
<section>
    <templateId root="2.16.840.1.113883.10.20.1.8"/> <!-- Medications section template -->
    <code code="10160-0" codeSystem="2.16.840.1.113883.6.1"/>
    <title>Medications</title>
    <text>
        <table border="1" width="100%">
            <thead>
                <tr><th>Medication</th><th>Instructions</th><th>Start Date</th><th>Status</th></tr>
            </thead>
            <tbody>
                <tr><td>Albuterol inhalant</td><td>2 puffs QID PRN wheezing</td><td>&#160;</td><td>Active</td></tr>
                <tr><td>Clopidogrel (Plavix)</td><td>75mg PO daily</td><td>&#160;</td><td>Active</td></tr>
                <tr><td>Metoprolol</td><td>25mg PO BID</td><td>&#160;</td><td>Active</td></tr>
                <tr><td>Prednisone</td><td>20mg PO daily</td><td>Mar 28, 2000</td><td>Active</td></tr>
                <tr><td>Cephalexin (Keflex)</td><td>500mg PO QID x 7 days (for bronchitis)</td><td>Mar 28, 2000</td><td>No longer active</td></tr>
            </tbody>
        </table>
    </text>
        <informant>
        <assignedEntity>
            <id extension="996-756-495" root="2.16.840.1.113883.19.5"/>
            <representedOrganization>
                <id root="2.16.840.1.113883.19.5"/>
                <name>Good Health Clinic</name>
            </representedOrganization>
        </assignedEntity>
    </informant>
    <entry typeCode="DRIV">
        <substanceAdministration classCode="SBADM" moodCode="EVN">
            <templateId root="2.16.840.1.113883.10.20.1.24"/> <!-- Medication activity template -->
            <id root="cdbd33f0-6cde-11db-9fe1-0800200c9a66"/>
            <statusCode code="active"/>
            <effectiveTime xsi:type="PIVL_TS">
                <period value="6" unit="h"/>
            </effectiveTime>
            <routeCode code="IPINHL" codeSystem="2.16.840.1.113883.5.112" codeSystemName="RouteOfAdministration" displayName="Inhalation, oral"/>
            <doseQuantity value="2"/>
            <administrationUnitCode code="415215001" codeSystem="2.16.840.1.113883.6.96" displayName="Puff"/>
            <consumable>
                <manufacturedProduct>
                    <templateId root="2.16.840.1.113883.10.20.1.53"/> <!-- Product template -->
                    <manufacturedMaterial>
                        <code code="307782" codeSystem="2.16.840.1.113883.6.88"  displayName="Albuterol 0.09 MG/ACTUAT inhalant solution">
                            <originalText>Albuterol inhalant</originalText>
                        </code>
                    </manufacturedMaterial>
                </manufacturedProduct>
            </consumable>
            <precondition typeCode="PRCN">
                <criterion>
                    <code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
                    <value xsi:type="CE" code="56018004" codeSystem="2.16.840.1.113883.6.96"  displayName="Wheezing"/>
                </criterion>
            </precondition>
        </substanceAdministration>
    </entry>
    <entry typeCode="DRIV">
        <substanceAdministration classCode="SBADM" moodCode="EVN">
            <templateId root="2.16.840.1.113883.10.20.1.24"/> <!-- Medication activity template -->
            <id root="cdbd5b05-6cde-11db-9fe1-0800200c9a66"/>
            <statusCode code="active"/>
            <effectiveTime xsi:type="PIVL_TS">
                <period value="24" unit="h"/>
            </effectiveTime>
            <routeCode code="PO" codeSystem="2.16.840.1.113883.5.112" codeSystemName="RouteOfAdministration"/>
            <doseQuantity value="1"/>
            <consumable>
                <manufacturedProduct>
                    <templateId root="2.16.840.1.113883.10.20.1.53"/> <!-- Product template -->
                    <manufacturedMaterial>
                        <code code="309362" codeSystem="2.16.840.1.113883.6.88"  displayName="Clopidogrel 75 MG oral tablet">
                            <originalText>Clopidogrel</originalText>
                        </code>
                        <name>Plavix</name>
                    </manufacturedMaterial>
                </manufacturedProduct>
            </consumable>
        </substanceAdministration>
    </entry>
    <entry typeCode="DRIV">
        <substanceAdministration classCode="SBADM" moodCode="EVN">
            <templateId root="2.16.840.1.113883.10.20.1.24"/> <!-- Medication activity template -->
            <id root="cdbd5b01-6cde-11db-9fe1-0800200c9a66"/>
            <statusCode code="active"/>
            <effectiveTime xsi:type="PIVL_TS">
                <period value="12" unit="h"/>
            </effectiveTime>
            <routeCode code="PO" codeSystem="2.16.840.1.113883.5.112" codeSystemName="RouteOfAdministration"/>
            <doseQuantity value="1"/>
            <consumable>
                <manufacturedProduct>
                    <templateId root="2.16.840.1.113883.10.20.1.53"/> <!-- Product template -->
                    <manufacturedMaterial>
                        <code code="430618" codeSystem="2.16.840.1.113883.6.88"  displayName="Metoprolol 25 MG oral tablet">
                            <originalText>Metoprolol</originalText>
                        </code>
                    </manufacturedMaterial>
                </manufacturedProduct>
            </consumable>
        </substanceAdministration>
    </entry>
    <entry typeCode="DRIV">
        <substanceAdministration classCode="SBADM" moodCode="EVN">
            <templateId root="2.16.840.1.113883.10.20.1.24"/> <!-- Medication activity template -->
            <id root="cdbd5b03-6cde-11db-9fe1-0800200c9a66"/>
            <statusCode code="active"/>
            <effectiveTime xsi:type="IVL_TS">
                <low value="20000328"/>
            </effectiveTime>
            <effectiveTime xsi:type="PIVL_TS" operator="A">
                <period value="24" unit="h"/>
            </effectiveTime>
            <routeCode code="PO" codeSystem="2.16.840.1.113883.5.112" codeSystemName="RouteOfAdministration"/>
            <doseQuantity value="1"/>
            <consumable>
                <manufacturedProduct>
                    <templateId root="2.16.840.1.113883.10.20.1.53"/> <!-- Product template -->
                    <manufacturedMaterial>
                        <code code="312615" codeSystem="2.16.840.1.113883.6.88"  displayName="Prednisone 20 MG oral tablet">
                            <originalText>Prednisone</originalText>
                        </code>
                    </manufacturedMaterial>
                </manufacturedProduct>
            </consumable>
        </substanceAdministration>
    </entry>
    <entry typeCode="DRIV">
        <substanceAdministration classCode="SBADM" moodCode="EVN">
            <templateId root="2.16.840.1.113883.10.20.1.24"/> <!-- Medication activity template -->
            <id root="cdbd5b07-6cde-11db-9fe1-0800200c9a66"/>
            <statusCode code="completed"/>
            <effectiveTime xsi:type="IVL_TS">
                <low value="20000328"/>
                <high value="20000404"/>
            </effectiveTime>
            <effectiveTime xsi:type="PIVL_TS" operator="A">
                <period value="6" unit="h"/>
            </effectiveTime>
            <routeCode code="PO" codeSystem="2.16.840.1.113883.5.112" codeSystemName="RouteOfAdministration"/>
            <doseQuantity value="1"/>
            <consumable>
                <manufacturedProduct>
                    <templateId root="2.16.840.1.113883.10.20.1.53"/> <!-- Product template -->
                    <manufacturedMaterial>
                        <code code="197454" codeSystem="2.16.840.1.113883.6.88"  displayName="Cephalexin 500 MG oral tablet">
                            <originalText>Cephalexin</originalText>
                        </code>
                        <name>Keflex</name>
                    </manufacturedMaterial>
                </manufacturedProduct>
            </consumable>
            <entryRelationship typeCode="RSON">
                <observation classCode="COND" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.1.28"/> <!-- Problem observation template -->
                    <id root="cdbd5b08-6cde-11db-9fe1-0800200c9a66"/>
                    <code code="ASSERTION" codeSystem="2.16.840.1.113883.5.4"/>
                    <statusCode code="completed"/>
                    <effectiveTime xsi:type="IVL_TS">
                        <low value="20000328"/>
                    </effectiveTime>
                    <value xsi:type="CE" code="32398004" codeSystem="2.16.840.1.113883.6.96"  displayName="Bronchitis"/>
                </observation>
            </entryRelationship>
        </substanceAdministration>
    </entry>
</section>
</component>
            <!--
********************************************************
Medical Equipment section
********************************************************
-->
<component>
<section>
    <templateId root="2.16.840.1.113883.10.20.1.7"/> <!-- Medical equipment section template -->
    <code code="46264-8" codeSystem="2.16.840.1.113883.6.1"/>
    <title>Medical Equipment</title>
    <text>
        <table border="1" width="100%">
            <thead>
                <tr><th>Supply/Device</th><th>Date Supplied</th></tr>
            </thead>
            <tbody>
                <tr><td>Automatic implantable cardioverter/defibrillator</td><td>Nov 1999</td></tr>
                <tr><td>Total hip replacement prosthesis</td><td>1998</td></tr>
                <tr><td>Wheelchair</td><td>1999</td></tr>
            </tbody>
        </table>
    </text>
    <entry typeCode="DRIV">
        <supply classCode="SPLY" moodCode="EVN">
            <templateId root="2.16.840.1.113883.10.20.1.34"/> <!-- Supply activity template -->
            <id root="2413773c-2372-4299-bbe6-5b0f60664446"/>
            <statusCode code="completed"/>
            <effectiveTime xsi:type="IVL_TS"><center value="199911"/></effectiveTime>
            <participant typeCode="DEV">
                <participantRole classCode="MANU">
                    <templateId root="2.16.840.1.113883.10.20.1.52"/> <!-- Product instance template -->
                    <playingDevice>
                        <code code="72506001" codeSystem="2.16.840.1.113883.6.96" displayName="Automatic implantable cardioverter/defibrillator"/>
                    </playingDevice>
                </participantRole>
            </participant>
        </supply>
    </entry>
    <entry typeCode="DRIV">
        <supply classCode="SPLY" moodCode="EVN">
            <templateId root="2.16.840.1.113883.10.20.1.34"/> <!-- Supply activity template -->
            <id root="230b0ab7-206d-42d8-a947-ab4f63aad795"/>
            <statusCode code="completed"/>
            <effectiveTime xsi:type="IVL_TS"><center value="1998"/></effectiveTime>
            <participant typeCode="DEV">
                <participantRole classCode="MANU">
                    <templateId root="2.16.840.1.113883.10.20.1.52"/> <!-- Product instance template -->
                    <id root="03ca01b0-7be1-11db-9fe1-0800200c9a66"/>
                    <playingDevice>
                        <code code="304120007" codeSystem="2.16.840.1.113883.6.96" displayName="Total hip replacement prosthesis"/>
                    </playingDevice>
                    <scopingEntity>
                        <id root="0abea950-5b40-4b7e-b8d9-2a5ea3ac5500"/>
                        <desc>Good Health Prostheses Company</desc>
                    </scopingEntity>
                </participantRole>
            </participant>
        </supply>
    </entry>
    <entry typeCode="DRIV">
        <supply classCode="SPLY" moodCode="EVN">
            <templateId root="2.16.840.1.113883.10.20.1.34"/> <!-- Supply activity template -->
            <id root="c4ffe98e-3cd3-4c54-b5bd-08ecb80379e0"/>
            <statusCode code="completed"/>
            <effectiveTime xsi:type="IVL_TS"><center value="1999"/></effectiveTime>
            <participant typeCode="DEV">
                <participantRole classCode="MANU">
                    <templateId root="2.16.840.1.113883.10.20.1.52"/> <!-- Product instance template -->
                    <playingDevice>
                        <code code="58938008" codeSystem="2.16.840.1.113883.6.96" displayName="Wheelchair"/>
                    </playingDevice>
                </participantRole>
            </participant>
        </supply>
    </entry>
</section>
</component>
            <!--
********************************************************
Immunizations section
********************************************************
-->
<component>
<section>
    <templateId root="2.16.840.1.113883.10.20.1.6"/> <!-- Immunizations section template -->
    <code code="11369-6" codeSystem="2.16.840.1.113883.6.1"/>
    <title>Immunizations</title>
    <text>
        <table border="1" width="100%">
            <thead>
                <tr><th>Vaccine</th><th>Date</th><th>Status</th></tr>
            </thead>
            <tbody>
                <tr><td>Influenza virus vaccine, IM</td><td>Nov 1999</td><td>Completed</td></tr>
                <tr><td>Influenza virus vaccine, IM</td><td>Dec 1998</td><td>Completed</td></tr>
                <tr><td>Pneumococcal polysaccharide vaccine, IM</td><td>Dec 1998</td><td>Completed</td></tr>
                <tr><td>Tetanus and diphtheria toxoids, IM</td><td>1997</td><td>Completed</td></tr>
            </tbody>
        </table>
    </text>
    <entry typeCode="DRIV">
        <substanceAdministration classCode="SBADM" moodCode="EVN">
            <templateId root="2.16.840.1.113883.10.20.1.24"/> <!-- Medication activity template -->
            <id root="e6f1ba43-c0ed-4b9b-9f12-f435d8ad8f92"/>
            <statusCode code="completed"/>
            <effectiveTime xsi:type="IVL_TS"><center value="199911"/></effectiveTime>
            <routeCode code="IM" codeSystem="2.16.840.1.113883.5.112" codeSystemName="RouteOfAdministration" displayName="Intramuscular injection"/>
            <consumable>
                <manufacturedProduct>
                    <templateId root="2.16.840.1.113883.10.20.1.53"/> <!-- Product template -->
                    <manufacturedMaterial>
                        <code code="88" codeSystem="2.16.840.1.113883.6.59" displayName="Influenza virus vaccine">
                            <originalText>Influenza virus vaccine</originalText>
                        </code>
                    </manufacturedMaterial>
                </manufacturedProduct>
            </consumable>
        </substanceAdministration>
    </entry>
    <entry typeCode="DRIV">
        <substanceAdministration classCode="SBADM" moodCode="EVN">
            <templateId root="2.16.840.1.113883.10.20.1.24"/> <!-- Medication activity template -->
            <id root="115f0f70-1343-4938-b62f-631de9749a0a"/>
            <statusCode code="completed"/>
            <effectiveTime xsi:type="IVL_TS"><center value="199812"/></effectiveTime>
            <routeCode code="IM" codeSystem="2.16.840.1.113883.5.112" codeSystemName="RouteOfAdministration" displayName="Intramuscular injection"/>
            <consumable>
                <manufacturedProduct>
                    <templateId root="2.16.840.1.113883.10.20.1.53"/> <!-- Product template -->
                    <manufacturedMaterial>
                        <code code="88" codeSystem="2.16.840.1.113883.6.59" displayName="Influenza virus vaccine">
                            <originalText>Influenza virus vaccine</originalText>
                        </code>
                    </manufacturedMaterial>
                </manufacturedProduct>
            </consumable>
        </substanceAdministration>
    </entry>
    <entry typeCode="DRIV">
        <substanceAdministration classCode="SBADM" moodCode="EVN">
            <templateId root="2.16.840.1.113883.10.20.1.24"/> <!-- Medication activity template -->
            <id root="78598407-9f16-42d5-8ffd-09281a60fe33"/>
            <statusCode code="completed"/>
            <effectiveTime xsi:type="IVL_TS"><center value="199812"/></effectiveTime>
            <routeCode code="IM" codeSystem="2.16.840.1.113883.5.112" codeSystemName="RouteOfAdministration" displayName="Intramuscular injection"/>
            <consumable>
                <manufacturedProduct>
                    <templateId root="2.16.840.1.113883.10.20.1.53"/> <!-- Product template -->
                    <manufacturedMaterial>
                        <code code="33" codeSystem="2.16.840.1.113883.6.59" displayName="Pneumococcal polysaccharide vaccine">
                            <originalText>Pneumococcal polysaccharide vaccine</originalText>
                        </code>
                    </manufacturedMaterial>
                </manufacturedProduct>
            </consumable>
        </substanceAdministration>
    </entry>
    <entry typeCode="DRIV">
        <substanceAdministration classCode="SBADM" moodCode="EVN">
            <templateId root="2.16.840.1.113883.10.20.1.24"/> <!-- Medication activity template -->
            <id root="261e94a0-95fb-4975-b5a5-c8e12c01c1bc"/>
            <statusCode code="completed"/>
            <effectiveTime xsi:type="IVL_TS"><center value="1997"/></effectiveTime>
            <routeCode code="IM" codeSystem="2.16.840.1.113883.5.112" codeSystemName="RouteOfAdministration" displayName="Intramuscular injection"/>
            <consumable>
                <manufacturedProduct>
                    <templateId root="2.16.840.1.113883.10.20.1.53"/> <!-- Product template -->
                    <manufacturedMaterial>
                        <code code="09" codeSystem="2.16.840.1.113883.6.59" displayName="Tetanus and diphtheria toxoids">
                            <originalText>Tetanus and diphtheria toxoids</originalText>
                        </code>
                    </manufacturedMaterial>
                </manufacturedProduct>
            </consumable>
        </substanceAdministration>
    </entry>
</section>
</component>
            <!--
********************************************************
Vital Signs section
********************************************************
-->
<component>
<section>
    <templateId root="2.16.840.1.113883.10.20.1.16"/> <!-- Vital signs section template -->
    <code code="8716-3" codeSystem="2.16.840.1.113883.6.1"/>
    <title>Vital Signs</title>
    <text>
        <table border="1" width="100%">
            <thead>
                <tr><th align="right">Date / Time: </th><th>Nov 14, 1999</th><th>April 7, 2000</th></tr>
            </thead>
            <tbody>
                <tr><th align="left">Height</th><td>177 cm</td><td>177 cm</td></tr>
                <tr><th align="left">Weight</th><td>86 kg</td><td>88 kg</td></tr>
                <tr><th align="left">Blood Pressure</th><td>132/86 mmHg</td><td>145/88 mmHg</td></tr>
            </tbody>
        </table>
    </text>
    <entry typeCode="DRIV">
        <organizer classCode="CLUSTER" moodCode="EVN">
            <templateId root="2.16.840.1.113883.10.20.1.35"/> <!-- Vital signs organizer template -->
            <id root="c6f88320-67ad-11db-bd13-0800200c9a66"/>
            <code code="46680005" codeSystem="2.16.840.1.113883.6.96" displayName="Vital signs"/>
            <statusCode code="completed"/>
            <effectiveTime value="19991114"/>
            <component>
                <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.1.31"/> <!-- Result observation template -->
                    <id root="c6f88321-67ad-11db-bd13-0800200c9a66"/>
                    <code code="50373000" codeSystem="2.16.840.1.113883.6.96" displayName="Body height"/>
                    <statusCode code="completed"/>
                    <effectiveTime value="19991114"/>
                    <value codeSystem="2.16.840.1.113883.6.8" xsi:type="PQ" value="177" unit="cm"/>
                </observation>
            </component>
            <component>
                <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.1.31"/> <!-- Result observation template -->
                    <id root="c6f88322-67ad-11db-bd13-0800200c9a66"/>
                    <code code="27113001" codeSystem="2.16.840.1.113883.6.96" displayName="Body weight"/>
                    <statusCode code="completed"/>
                    <effectiveTime value="19991114"/>
                    <value codeSystem="2.16.840.1.113883.6.8" xsi:type="PQ" value="86" unit="kg"/>
                </observation>
            </component>
            <component>
                <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.1.31"/> <!-- Result observation template -->
                    <id root="c6f88323-67ad-11db-bd13-0800200c9a66"/>
                    <code code="271649006" codeSystem="2.16.840.1.113883.6.96" displayName="Systolic BP"/>
                    <statusCode code="completed"/>
                    <effectiveTime value="19991114"/>
                    <value codeSystem="2.16.840.1.113883.6.8" xsi:type="PQ" value="132" unit="mm[Hg]"/>
                </observation>
            </component>
            <component>
                <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.1.31"/> <!-- Result observation template -->
                    <id root="c6f88324-67ad-11db-bd13-0800200c9a66"/>
                    <code code="271650006" codeSystem="2.16.840.1.113883.6.96" displayName="Diastolic BP"/>
                    <statusCode code="completed"/>
                    <effectiveTime value="19991114"/>
                    <value codeSystem="2.16.840.1.113883.6.8" xsi:type="PQ" value="86" unit="mm[Hg]"/>
                </observation>
            </component>
        </organizer>
    </entry>
    <entry typeCode="DRIV">
        <organizer classCode="CLUSTER" moodCode="EVN">
            <templateId root="2.16.840.1.113883.10.20.1.35"/> <!-- Vital signs organizer template -->
            <id root="d11275e0-67ae-11db-bd13-0800200c9a66"/>
            <code code="46680005" codeSystem="2.16.840.1.113883.6.96" displayName="Vital signs"/>
            <statusCode code="completed"/>
            <effectiveTime value="20000407"/>
            <component>
                <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.1.31"/> <!-- Result observation template -->
                    <id root="d11275e1-67ae-11db-bd13-0800200c9a66"/>
                    <code code="50373000" codeSystem="2.16.840.1.113883.6.96" displayName="Body height"/>
                    <statusCode code="completed"/>
                    <effectiveTime value="20000407"/>
                    <value codeSystem="2.16.840.1.113883.6.8" xsi:type="PQ" value="177" unit="cm"/>
                </observation>
            </component>
            <component>
                <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.1.31"/> <!-- Result observation template -->
                    <id root="d11275e2-67ae-11db-bd13-0800200c9a66"/>
                    <code code="27113001" codeSystem="2.16.840.1.113883.6.96" displayName="Body weight"/>
                    <statusCode code="completed"/>
                    <effectiveTime value="20000407"/>
                    <value codeSystem="2.16.840.1.113883.6.8" xsi:type="PQ" value="88" unit="kg"/>
                </observation>
            </component>
            <component>
                <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.1.31"/> <!-- Result observation template -->
                    <id root="d11275e3-67ae-11db-bd13-0800200c9a66"/>
                    <code code="271649006" codeSystem="2.16.840.1.113883.6.96" displayName="Systolic BP"/>
                    <statusCode code="completed"/>
                    <effectiveTime value="20000407"/>
                    <value codeSystem="2.16.840.1.113883.6.8" xsi:type="PQ" value="145" unit="mm[Hg]"/>
                </observation>
            </component>
            <component>
                <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.1.31"/> <!-- Result observation template -->
                    <id root="d11275e4-67ae-11db-bd13-0800200c9a66"/>
                    <code code="271650006" codeSystem="2.16.840.1.113883.6.96" displayName="Diastolic BP"/>
                    <statusCode code="completed"/>
                    <effectiveTime value="20000407"/>
                    <value codeSystem="2.16.840.1.113883.6.8" xsi:type="PQ" value="88" unit="mm[Hg]"/>
                </observation>
            </component>
        </organizer>
    </entry>
</section>
</component>
            <!--
********************************************************
Results section
********************************************************
-->
<component>
<section>
    <templateId root="2.16.840.1.113883.10.20.1.14"/> <!-- Results section template -->
    <code code="30954-2" codeSystem="2.16.840.1.113883.6.1"/>
    <title>Results</title>
    <text>
        <table border="1" width="100%">
            <thead>
                <tr><th>&#160;</th><th>March 23, 2000</th><th>April 06, 2000</th></tr>
            </thead>
            <tbody>
                <tr><td colspan="3"><content styleCode="BoldItalics">Hematology</content></td></tr>
                <tr><td>HGB (M 13-18 g/dl; F 12-16 g/dl)</td><td>13.2</td><td>&#160;</td></tr>
                <tr><td>WBC (4.3-10.8 10+3/ul)</td><td>6.7</td><td>&#160;</td></tr>
                <tr><td>PLT (135-145 meq/l)</td><td>123*</td><td>&#160;</td></tr>
                <tr><td colspan="3"><content styleCode="BoldItalics">Chemistry</content></td></tr>
                <tr><td>NA (135-145meq/l)</td><td>&#160;</td><td>140</td></tr>
                <tr><td>K (3.5-5.0 meq/l)</td><td>&#160;</td><td>4.0</td></tr>
                <tr><td>CL (98-106 meq/l)</td><td>&#160;</td><td>102</td></tr>
                <tr><td>HCO3 (18-23 meq/l)</td><td>&#160;</td><td>35*</td></tr>
            </tbody>
        </table>
    </text>
    <entry typeCode="DRIV">
        <organizer classCode="BATTERY" moodCode="EVN">
            <templateId root="2.16.840.1.113883.10.20.1.32"/> <!-- Result organizer template -->
            <id root="7d5a02b0-67a4-11db-bd13-0800200c9a66"/>
            <code code="43789009" codeSystem="2.16.840.1.113883.6.96" displayName="CBC WO DIFFERENTIAL"/>
            <statusCode code="completed"/>
            <effectiveTime value="200003231430"/>
            <component>
                <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.1.31"/> <!-- Result observation template -->
                    <id root="107c2dc0-67a5-11db-bd13-0800200c9a66"/>
                    <code code="30313-1" codeSystem="2.16.840.1.113883.6.1" displayName="HGB"/>
                    <statusCode code="completed"/>
                    <effectiveTime value="200003231430"/>
                    <value xsi:type="PQ" value="13.2" unit="g/dl"/>
                    <interpretationCode code="N" codeSystem="2.16.840.1.113883.5.83"/>
                    <referenceRange>
                        <observationRange>
                            <text>M 13-18 g/dl; F 12-16 g/dl</text>
                        </observationRange>
                    </referenceRange>
                </observation>
            </component>
            <component>
                <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.1.31"/> <!-- Result observation template -->
                    <id root="8b3fa370-67a5-11db-bd13-0800200c9a66"/>
                    <code code="33765-9" codeSystem="2.16.840.1.113883.6.1" displayName="WBC"/>
                    <statusCode code="completed"/>
                    <effectiveTime value="200003231430"/>
                    <value xsi:type="PQ" value="6.7" unit="10+3/ul"/>
                    <interpretationCode code="N" codeSystem="2.16.840.1.113883.5.83"/>
                    <referenceRange>
                        <observationRange>
                            <value xsi:type="IVL_PQ">
                                <low value="4.3" unit="10+3/ul"/>
                                <high value="10.8" unit="10+3/ul"/>
                            </value>
                        </observationRange>
                    </referenceRange>
                </observation>
            </component>
            <component>
                <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.1.31"/> <!-- Result observation template -->
                    <id root="80a6c740-67a5-11db-bd13-0800200c9a66"/>
                    <code code="26515-7" codeSystem="2.16.840.1.113883.6.1" displayName="PLT"/>
                    <statusCode code="completed"/>
                    <effectiveTime value="200003231430"/>
                    <value xsi:type="PQ" value="123" unit="10+3/ul"/>
                    <interpretationCode code="L" codeSystem="2.16.840.1.113883.5.83"/>
                    <referenceRange>
                        <observationRange>
                            <value xsi:type="IVL_PQ">
                                <low value="150" unit="10+3/ul"/>
                                <high value="350" unit="10+3/ul"/>
                            </value>
                        </observationRange>
                    </referenceRange>
                </observation>
            </component>
        </organizer>
    </entry>
    <entry typeCode="DRIV">
        <organizer classCode="BATTERY" moodCode="EVN">
            <templateId root="2.16.840.1.113883.10.20.1.32"/> <!-- Result organizer template -->
            <id root="a40027e0-67a5-11db-bd13-0800200c9a66"/>
            <code code="20109005" codeSystem="2.16.840.1.113883.6.96" displayName="LYTES"/>
            <statusCode code="completed"/>
            <effectiveTime value="200004061300"/>
            <component>
                <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.1.31"/> <!-- Result observation template -->
                    <id root="a40027e1-67a5-11db-bd13-0800200c9a66"/>
                    <code code="2951-2" codeSystem="2.16.840.1.113883.6.1" displayName="NA"/>
                    <statusCode code="completed"/>
                    <effectiveTime value="200004061300"/>
                    <value xsi:type="PQ" value="140" unit="meq/l"/>
                    <interpretationCode code="N" codeSystem="2.16.840.1.113883.5.83"/>
                    <referenceRange>
                        <observationRange>
                            <value xsi:type="IVL_PQ">
                                <low value="135" unit="meq/l"/>
                                <high value="145" unit="meq/l"/>
                            </value>
                        </observationRange>
                    </referenceRange>
                </observation>
            </component>
            <component>
                <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.1.31"/> <!-- Result observation template -->
                    <id root="a40027e2-67a5-11db-bd13-0800200c9a66"/>
                    <code code="2823-3" codeSystem="2.16.840.1.113883.6.1" displayName="K"/>
                    <statusCode code="completed"/>
                    <effectiveTime value="200004061300"/>
                    <value xsi:type="PQ" value="4.0" unit="meq/l"/>
                    <interpretationCode code="N" codeSystem="2.16.840.1.113883.5.83"/>
                    <referenceRange>
                        <observationRange>
                            <value xsi:type="IVL_PQ">
                                <low value="3.5" unit="meq/l"/>
                                <high value="5.0" unit="meq/l"/>
                            </value>
                        </observationRange>
                    </referenceRange>
                </observation>
            </component>
            <component>
                <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.1.31"/> <!-- Result observation template -->
                    <id root="a40027e3-67a5-11db-bd13-0800200c9a66"/>
                    <code code="2075-0" codeSystem="2.16.840.1.113883.6.1" displayName="CL"/>
                    <statusCode code="completed"/>
                    <effectiveTime value="200004061300"/>
                    <value xsi:type="PQ" value="102" unit="meq/l"/>
                    <interpretationCode code="N" codeSystem="2.16.840.1.113883.5.83"/>
                    <referenceRange>
                        <observationRange>
                            <value xsi:type="IVL_PQ">
                                <low value="98" unit="meq/l"/>
                                <high value="106" unit="meq/l"/>
                            </value>
                        </observationRange>
                    </referenceRange>
                </observation>
            </component>
            <component>
                <observation classCode="OBS" moodCode="EVN">
                    <templateId root="2.16.840.1.113883.10.20.1.31"/> <!-- Result observation template -->
                    <id root="a40027e4-67a5-11db-bd13-0800200c9a66"/>
                    <code code="1963-8" codeSystem="2.16.840.1.113883.6.1" displayName="HCO3"/>
                    <statusCode code="completed"/>
                    <effectiveTime value="200004061300"/>
                    <value xsi:type="PQ" value="35" unit="meq/l"/>
                    <interpretationCode code="H" codeSystem="2.16.840.1.113883.5.83"/>
                    <referenceRange>
                        <observationRange>
                            <value xsi:type="IVL_PQ">
                                <low value="18" unit="meq/l"/>
                                <high value="23" unit="meq/l"/>
                            </value>
                        </observationRange>
                    </referenceRange>
                </observation>
            </component>
        </organizer>
    </entry>
</section>
</component>
            <!--
********************************************************
Procedures section
********************************************************
-->
<component>
<section>
    <templateId root="2.16.840.1.113883.10.20.1.12"/> <!-- Procedures section template -->
    <code code="47519-4" codeSystem="2.16.840.1.113883.6.1"/>
    <title>Procedures</title>
    <text>
            <table border="1" width="100%">
            <thead>
                <tr><th>Procedure</th><th>Date</th></tr>
            </thead>
            <tbody>
                <tr><td><content ID="Proc1">Total hip replacement, left</content></td><td>1998</td></tr>
            </tbody>
        </table>
    </text>
    <entry typeCode="DRIV">
        <procedure classCode="PROC" moodCode="EVN">
            <templateId root="2.16.840.1.113883.10.20.1.29"/> <!-- Procedure activity template -->
            <id root="e401f340-7be2-11db-9fe1-0800200c9a66"/>
            <code code="52734007" codeSystem="2.16.840.1.113883.6.96" displayName="Total hip replacement">
                <originalText><reference value="#Proc1"/></originalText>
                <qualifier>
                    <name code="272741003" displayName="Laterality"/>
                    <value code="7771000" displayName="Left"/>
                </qualifier>
            </code>
            <statusCode code="completed"/>
            <effectiveTime value="1998"/>
            <participant typeCode="DEV">
                <participantRole classCode="MANU">
                    <templateId root="2.16.840.1.113883.10.20.1.52"/> <!-- Product instance template -->
                    <id root="03ca01b0-7be1-11db-9fe1-0800200c9a66"/>
                </participantRole>
            </participant>
        </procedure>
    </entry>
</section>
</component>
 
            <!--
********************************************************
Encounters section
********************************************************
-->
<component>
<section>
    <templateId root="2.16.840.1.113883.10.20.1.3"/> <!-- Encounters section template -->
    <code code="46240-8" codeSystem="2.16.840.1.113883.6.1"/>
    <title>Encounters</title>
    <text>
        <table border="1" width="100%">
            <thead>
                <tr><th>Encounter</th><th>Location</th><th>Date</th></tr>
            </thead>
            <tbody>
                <tr><td>Checkup Examination</td><td>Good Health Clinic</td><td>Apr 07, 2000</td></tr>
            </tbody>
        </table>
    </text>
    <entry typeCode="DRIV">
        <encounter classCode="ENC" moodCode="EVN">
            <templateId root="2.16.840.1.113883.10.20.1.21"/> <!-- Encounter activity template -->
            <id root="2a620155-9d11-439e-92b3-5d9815ff4de8"/>
            <code code="GENRL" codeSystem="2.16.840.1.113883.5.4" displayName="General">
                <originalText>Checkup Examination</originalText>
            </code>
            <effectiveTime value="20000407"/>
            <participant typeCode="LOC">
                <templateId root="2.16.840.1.113883.10.20.1.45"/> <!-- Location participation template -->
                <participantRole classCode="SDLOC">
                    <id root="2.16.840.1.113883.19.5"/>
                    <playingEntity classCode="PLC">
                        <name>Good Health Clinic</name>
                    </playingEntity>
                </participantRole>
            </participant>
        </encounter>
    </entry>
</section>
</component>
            <!--
********************************************************
Plan of Care section
********************************************************
-->
<component>
<section>
    <templateId root="2.16.840.1.113883.10.20.1.10"/> <!-- Plan of Care section template -->
    <code code="18776-5" codeSystem="2.16.840.1.113883.6.1"/>
    <title>Plan</title>
        <text>
        <table border="1" width="100%">
            <thead>
            <tr><th>Planned Activity</th><th>Planned Date</th></tr>
            </thead>
            <tbody>
            <tr><td>Pulmonary function test</td><td>April 21, 2000</td></tr>
            </tbody>
        </table>
    </text>
    <entry typeCode="DRIV">
        <observation classCode="OBS" moodCode="RQO">
            <templateId root="2.16.840.1.113883.10.20.1.25"/> <!-- Plan of Activity activity template -->
            <id root="9a6d1bac-17d3-4195-89a4-1121bc809b4a"/>
            <code code="23426006" codeSystem="2.16.840.1.113883.6.96" displayName="Pulmonary function test"/>
            <statusCode code="new"/>
            <effectiveTime><center value="20000421"/></effectiveTime>
        </observation>
    </entry>
</section>
</component>
</structuredBody>
</component>
</ClinicalDocument>

Questionapplication to update itself...memberJassim Rahma7-Dec-12 2:10 
Hi,
 
I want to know what's the best way to let the c# application update itself so when user starts the application it will notify and update without having to re-install the application?

 
Technology News @ www.JassimRahma.com

AnswerRe: application to update itself...memberSimon_Whale7-Dec-12 2:22 
have a google for click once
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch

AnswerRe: application to update itself...mvpDave Kreskowiak7-Dec-12 4:41 
You can use ClickOnce for this.
 
If you install your application under the Program Files folder, the users will NOT be able to update their applications. The Program Files folder is readonly for normal users on Windows Vista and above. So, this means you'll have to install your application somewhere where users have permissions to write to the folder.
 
Frankly, in corporate environments, a self-updating application is generally forwned upon because the new version of the application cannot be tested before going to production.

GeneralRe: application to update itself...memberEnnis Ray Lynch, Jr.7-Dec-12 5:03 
Hah, testing before production? The primary reason so many apps are going to the web is so they can be updated faster, bypassing IM testing : )
 
Dave Kreskowiak wrote:
Frankly, in corporate environments, a self-updating application is generally forwned upon because the new version of the application cannot be tested before going to production.

Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting.
 
"And they, since they Were not the one dead, turned to their affairs" -- Robert Frost
 
"All users always want Excel" --Ennis Lynch

AnswerRe: application to update itself...memberPathachiever7-Dec-12 6:08 
The application needs the DLLs refreshed and therefore, it needs to restarted. However, you can try ClickOnce. You can also have a separate application that gets run before your app, checks for updates, installs them, and then runs the main application.
 
I haven't done Win App development for over 3 years, so my knowledge isn't up-to-date. Still, these are two ways you can do it. Google Chrome, I believe, uses ClickOnce.
Questionhow to convert hex to rgb color code in asp.netgroupDeenuji vellore6-Dec-12 23:13 
Actually i'm using color extender to pick the color in asp.net...but while i'm picking the color it generate the hex decimal values....but i need only rgb values...Pls guide me sir.... Blush | :O Blush | :O

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   


Advertise | Privacy | Mobile
Web02 | 2.6.130617.1 | Last Updated 19 Jun 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid