issues with the CDAR2 DSL (manipulation of address data)

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

issues with the CDAR2 DSL (manipulation of address data)

Kamp, Daniel (GE Healthcare)
Good afternoon all,
 
I am working with the CDAR2 DSL and am having some issues manipulating data in the address data element (e.g., AD).
I have tried both:
    a) handling the object graph directly:
           POCDMT000040ClinicalDocument
               POCDMT000040RecordTarget
                  POCDMT000040RecordTarget
                      POCDMT000040PatientRole
                           EList<AD>
    b) and using Groovy (via transmogrification)
 
What I am trying to do is read in the postal code and modify it.  I am able to get the value, but am unable
to modify it in the object graph.  This is because the object graph representation in the address (AD) element
is:
        AD.postalCode
            where postalCode is an EList<ADXP>.
        I am able to read the postalCode value by accessing it in this way:
              postalCode.getMixed().get(0).getValue();
        However, there is no setter method to set the postal code value.
 
I have traversed the CDAR2 object graph and see that it is descendent of the
   org.eclipse.emf.ecore
structures (but am not familiar with the handing of eclipse FeatureMaps).
 
Does anyone have a code snippet that I could use to assign a postalCode a desired value.  I need to
be able to do this through code and directly against the object graph.  I would like to use the CDAR DSL
if I can and do not want to have to create my own.  Any and all help would be greatly appreciated.
 
Thank you in advance,
Dan Kamp
 
Dan Kamp
GE Healthcare
Information Technologies - eHealth
Connectivity Solutions Engineering
T (847) 277- 4327
D *567-4327
E <A title="mailto:daniel.kamp@ge.com&#10;mailto:balasubramani.balaiah@ge.com" href="blocked::mailto:daniel.kamp@ge.com">daniel.kamp@...
<A title=http://www.geheathcare.com/ href="blocked::http://www.gehealthcare.com/">www.gehealthcare.com
 

_______________________________________________
Ipf-developer mailing list
[hidden email]
http://gforge.openehealth.org/mailman/listinfo/ipf-developer
Reply | Threaded
Open this post in threaded view
|

Re: issues with the CDAR2 DSL (manipulation of addressdata)

stefan.ivanov

Hi Daniel

adding an 'addr' Element to the PatientRole using the Graph directly is a little bit complex. The reason is the AD has a mixed content. Using EMF Feature Maps is really not so easy.
Using the IPF's DSL should be easier (please have a look at the snippet below).
...
patientRole {
    ...
    addr{
        streetAddressLine('21 North Ave')
        city('Burlington')
          state('MA')
        postalCode('01803')
        country('USA')
    }
    ...
}
...

Is this usable for you?

Regards
Stefan

Stefan Ivanov | R&D ProfessionalGate
InterComponentWare AG | Altrottstraße 31 | 69190 Walldorf (Baden) | Germany
Tel.: +49 (0) 6227 385 257 | Fax: +49 (0) 6227 385 491 | Mobile: +49 172 6205362
[hidden email] |
www.icw.de| www.lifesensor.com




From:"Kamp, Daniel (GE Healthcare)" <[hidden email]>
To:<[hidden email]>
Date:10.05.2010 20:16
Subject:[Ipf-developer] issues with the CDAR2 DSL (manipulation of address        data)
Sent by:[hidden email]





Good afternoon all,
 
I am working with the CDAR2 DSL and am having some issues manipulating data in the address data element (e.g., AD).
I have tried both:
    a) handling the object graph directly:
           POCDMT000040ClinicalDocument
              POCDMT000040RecordTarget
                 POCDMT000040RecordTarget
                     POCDMT000040PatientRole
                          EList<AD>

    b) and using Groovy (via transmogrification)
 
What I am trying to do is read in the postal code and modify it.  I am able to get the value, but am unable
to modify it in the object graph.  This is because the object graph representation in the address (AD) element
is:
        AD.postalCode
            where postalCode is an EList<ADXP>.
        I am able to read the postalCode value by accessing it in this way:
              postalCode.getMixed().get(0).getValue();
        However, there is no setter method to set the postal code value.
 
I have traversed the CDAR2 object graph and see that it is descendent of the
   org.eclipse.emf.ecore
structures (but am not familiar with the handing of eclipse FeatureMaps).
 
Does anyone have a code snippet that I could use to assign a postalCode a desired value.  I need to
be able to do this through code and directly against the object graph.  I would like to use the CDAR DSL
if I can and do not want to have to create my own.  Any and all help would be greatly appreciated.
 
Thank you in advance,
Dan Kamp
 
Dan Kamp
GE Healthcare
Information Technologies - eHealth
Connectivity Solutions Engineering
T (847) 277- 4327
D *567-4327

E <a href=blocked::mailto:daniel.kamp@ge.com>daniel.kamp@...
<a href=blocked::http://www.gehealthcare.com/>www.gehealthcare.com
 _______________________________________________
Ipf-developer mailing list
[hidden email]
http://gforge.openehealth.org/mailman/listinfo/ipf-developer


InterComponentWare AG:
Vorstand: Peter Kirschbauer (Vors.), Jörg Stadler / Aufsichtsratsvors.: Prof. Dr. Christof Hettich
Firmensitz: 69190 Walldorf, Altrottstraße 31 / AG Mannheim HRB 351761 / USt.-IdNr.: DE 198388516

_______________________________________________
Ipf-developer mailing list
[hidden email]
http://gforge.openehealth.org/mailman/listinfo/ipf-developer
Reply | Threaded
Open this post in threaded view
|

Re: issues with the CDAR2 DSL (manipulation ofaddressdata)

Kamp, Daniel (GE Healthcare)
Good morning/evening Stefan and thank you for the quick response.
 
I am not doing this through a builder, but instead have an existing object graph (used the CDAR2Parser to marshal the XML).  Will this snippet work in the groovy transmogrify code?
 
Thank you again,
Dan


From: [hidden email] [mailto:[hidden email]] On Behalf Of [hidden email]
Sent: Tuesday, May 11, 2010 9:41 AM
To: [hidden email]
Subject: Re: [Ipf-developer] issues with the CDAR2 DSL (manipulation ofaddressdata)


Hi Daniel

adding an 'addr' Element to the PatientRole using the Graph directly is a little bit complex. The reason is the AD has a mixed content. Using EMF Feature Maps is really not so easy.
Using the IPF's DSL should be easier (please have a look at the snippet below).
...
patientRole {
    ...
    addr{
        streetAddressLine('21 North Ave')
        city('Burlington')
          state('MA')
        postalCode('01803')
        country('USA')
    }
    ...
}
...

Is this usable for you?

Regards
Stefan

Stefan Ivanov | R&D ProfessionalGate
InterComponentWare AG | Altrottstraße 31 | 69190 Walldorf (Baden) | Germany
Tel.: +49 (0) 6227 385 257 | Fax: +49 (0) 6227 385 491 | Mobile: +49 172 6205362
[hidden email] |
www.icw.de| www.lifesensor.com




From: "Kamp, Daniel (GE Healthcare)" <[hidden email]>
To: <[hidden email]>
Date: 10.05.2010 20:16
Subject: [Ipf-developer] issues with the CDAR2 DSL (manipulation of address        data)
Sent by: [hidden email]





Good afternoon all,
 
I am working with the CDAR2 DSL and am having some issues manipulating data in the address data element (e.g., AD).
I have tried both:
    a) handling the object graph directly:
           POCDMT000040ClinicalDocument
              POCDMT000040RecordTarget
                 POCDMT000040RecordTarget
                     POCDMT000040PatientRole
                          EList<AD>

    b) and using Groovy (via transmogrification)
 
What I am trying to do is read in the postal code and modify it.  I am able to get the value, but am unable
to modify it in the object graph.  This is because the object graph representation in the address (AD) element
is:
        AD.postalCode
            where postalCode is an EList<ADXP>.
        I am able to read the postalCode value by accessing it in this way:
              postalCode.getMixed().get(0).getValue();
        However, there is no setter method to set the postal code value.
 
I have traversed the CDAR2 object graph and see that it is descendent of the
   org.eclipse.emf.ecore
structures (but am not familiar with the handing of eclipse FeatureMaps).
 
Does anyone have a code snippet that I could use to assign a postalCode a desired value.  I need to
be able to do this through code and directly against the object graph.  I would like to use the CDAR DSL
if I can and do not want to have to create my own.  Any and all help would be greatly appreciated.
 
Thank you in advance,
Dan Kamp
 
Dan Kamp
GE Healthcare
Information Technologies - eHealth
Connectivity Solutions Engineering
T (847) 277- 4327
D *567-4327

E <A href="blocked::mailto:daniel.kamp@ge.com">daniel.kamp@...
<A href="blocked::http://www.gehealthcare.com/">www.gehealthcare.com
 _______________________________________________
Ipf-developer mailing list
[hidden email]
http://gforge.openehealth.org/mailman/listinfo/ipf-developer


InterComponentWare AG:
Vorstand: Peter Kirschbauer (Vors.), Jörg Stadler / Aufsichtsratsvors.: Prof. Dr. Christof Hettich
Firmensitz: 69190 Walldorf, Altrottstraße 31 / AG Mannheim HRB 351761 / USt.-IdNr.: DE 198388516

_______________________________________________
Ipf-developer mailing list
[hidden email]
http://gforge.openehealth.org/mailman/listinfo/ipf-developer
Reply | Threaded
Open this post in threaded view
|

Re: issues with the CDAR2 DSL (manipulationofaddressdata)

stefan.ivanov

Hi Dan,

I did tried it in a Test Case. You could have a look in the org.openehealth.ipf.modules.cda.builder.CDAR2BuilderTest. In this case I'm creating an PatientRole instance.
The snippet could be used also in a transmogrifier but it depends if you should add a whole RecordTarget or you just want to add the content to the existing instance.
What do you exactly want to do? It would be very ueseful if you could provide me some sample code.

Regards,
Stefan


From:"Kamp, Daniel (GE Healthcare)" <[hidden email]>
To:<[hidden email]>
Date:11.05.2010 16:59
Subject:Re: [Ipf-developer] issues with the CDAR2 DSL (manipulation        ofaddressdata)
Sent by:[hidden email]





Good morning/evening Stefan and thank you for the quick response.
 
I am not doing this through a builder, but instead have an existing object graph (used the CDAR2Parser to marshal the XML).  Will this snippet work in the groovy transmogrify code?
 
Thank you again,
Dan



From: [hidden email] [[hidden email]] On Behalf Of [hidden email]
Sent:
Tuesday, May 11, 2010 9:41 AM
To:
[hidden email]
Subject:
Re: [Ipf-developer] issues with the CDAR2 DSL (manipulation ofaddressdata)



Hi Daniel


adding an 'addr' Element to the PatientRole using the Graph directly is a little bit complex. The reason is the AD has a mixed content. Using EMF Feature Maps is really not so easy.
Using the IPF's DSL should be easier (please have a look at the snippet below).
...

patientRole
{
   ...
   addr{
       streetAddressLine(
'21 North Ave')
       city(
'Burlington')
         state(
'MA')
       postalCode(
'01803')
       country(
'USA')
   }
   ...
}

...


Is this usable for you?


Regards
Stefan

Stefan Ivanov | R&D ProfessionalGate
InterComponentWare AG | Altrottstraße 31 | 69190 Walldorf (Baden) | Germany
Tel.: +49 (0) 6227 385 257 | Fax: +49 (0) 6227 385 491 | Mobile: +49 172 6205362
[hidden email] |
www.icw.de| www.lifesensor.com



From:"Kamp, Daniel (GE Healthcare)" <[hidden email]>
To:<[hidden email]>
Date:10.05.2010 20:16
Subject:[Ipf-developer] issues with the CDAR2 DSL (manipulation of address        data)
Sent by:[hidden email]






Good afternoon all,


I am working with the CDAR2 DSL and am having some issues manipulating data in the address data element (e.g., AD).
I have tried both:
   a) handling the object graph directly:
          POCDMT000040ClinicalDocument
             POCDMT000040RecordTarget
                POCDMT000040RecordTarget
                    POCDMT000040PatientRole
                         EList<AD>
   b) and using Groovy (via transmogrification)


What I am trying to do is read in the postal code and modify it.  I am able to get the value, but am unable
to modify it in the object graph.  This is because the object graph representation in the address (AD) element
is:
       AD.postalCode
           where postalCode is an EList<ADXP>.
       I am able to read the postalCode value by accessing it in this way:
             postalCode.getMixed().get(0).getValue();
       However, there is no setter method to set the postal code value.


I have traversed the CDAR2 object graph and see that it is descendent of the
  org.eclipse.emf.ecore
structures (but am not familiar with the handing of eclipse FeatureMaps).


Does anyone have a code snippet that I could use to assign a postalCode a desired value.  I need to
be able to do this through code and directly against the object graph.  I would like to use the CDAR DSL
if I can and do not want to have to create my own.  Any and all help would be greatly appreciated.


Thank you in advance,
Dan Kamp


Dan Kamp
GE Healthcare
Information Technologies - eHealth
Connectivity Solutions Engineering
T (847) 277- 4327
D *567-4327
E
<a href=blocked::mailto:daniel.kamp@ge.com>daniel.kamp@...
<a href=blocked::http://www.gehealthcare.com/>www.gehealthcare.com
_______________________________________________
Ipf-developer mailing list
[hidden email]

http://gforge.openehealth.org/mailman/listinfo/ipf-developer


InterComponentWare AG:
Vorstand: Peter Kirschbauer (Vors.), Jörg Stadler / Aufsichtsratsvors.: Prof. Dr. Christof Hettich
Firmensitz: 69190 Walldorf, Altrottstraße 31 / AG Mannheim HRB 351761 / USt.-IdNr.: DE 198388516
_______________________________________________
Ipf-developer mailing list
[hidden email]
http://gforge.openehealth.org/mailman/listinfo/ipf-developer


InterComponentWare AG:
Vorstand: Peter Kirschbauer (Vors.), Jörg Stadler / Aufsichtsratsvors.: Prof. Dr. Christof Hettich
Firmensitz: 69190 Walldorf, Altrottstraße 31 / AG Mannheim HRB 351761 / USt.-IdNr.: DE 198388516

_______________________________________________
Ipf-developer mailing list
[hidden email]
http://gforge.openehealth.org/mailman/listinfo/ipf-developer
Reply | Threaded
Open this post in threaded view
|

Re: issues with the CDAR2 DSL(manipulationofaddressdata)

Kamp, Daniel (GE Healthcare)
Hello Stefan and everyone,
 
We figured out here how to make it work. The following code snippet allows you to replace an existing value in the object graph.  Many of the elements take this same structure (SimpleFeatureMapEntry), and can be modified the same way:
 

Internal feature = (Internal) currEntry.getEStructuralFeature();

postalCdADXP.getMixed().remove(0);

EStructuralFeatureImpl.SimpleFeatureMapEntry entry =

new EStructuralFeatureImpl.SimpleFeatureMapEntry(feature, modifiedPostalCode);

postalCdADXP.getMixed().add(0, entry);

Thank you again for your assistance,
Dan


From: [hidden email] [mailto:[hidden email]] On Behalf Of [hidden email]
Sent: Tuesday, May 11, 2010 10:57 AM
To: [hidden email]
Subject: Re: [Ipf-developer] issues with the CDAR2 DSL(manipulationofaddressdata)


Hi Dan,

I did tried it in a Test Case. You could have a look in the org.openehealth.ipf.modules.cda.builder.CDAR2BuilderTest. In this case I'm creating an PatientRole instance.
The snippet could be used also in a transmogrifier but it depends if you should add a whole RecordTarget or you just want to add the content to the existing instance.
What do you exactly want to do? It would be very ueseful if you could provide me some sample code.

Regards,
Stefan


From: "Kamp, Daniel (GE Healthcare)" <[hidden email]>
To: <[hidden email]>
Date: 11.05.2010 16:59
Subject: Re: [Ipf-developer] issues with the CDAR2 DSL (manipulation        ofaddressdata)
Sent by: [hidden email]





Good morning/evening Stefan and thank you for the quick response.
 
I am not doing this through a builder, but instead have an existing object graph (used the CDAR2Parser to marshal the XML).  Will this snippet work in the groovy transmogrify code?
 
Thank you again,
Dan



From: [hidden email] [[hidden email]] On Behalf Of [hidden email]
Sent:
Tuesday, May 11, 2010 9:41 AM
To:
[hidden email]
Subject:
Re: [Ipf-developer] issues with the CDAR2 DSL (manipulation ofaddressdata)



Hi Daniel


adding an 'addr' Element to the PatientRole using the Graph directly is a little bit complex. The reason is the AD has a mixed content. Using EMF Feature Maps is really not so easy.
Using the IPF's DSL should be easier (please have a look at the snippet below).
...

patientRole
{
   ...
   addr{
       streetAddressLine(
'21 North Ave')
       city(
'Burlington')
         state(
'MA')
       postalCode(
'01803')
       country(
'USA')
   }
   ...
}

...


Is this usable for you?


Regards
Stefan

Stefan Ivanov | R&D ProfessionalGate
InterComponentWare AG | Altrottstraße 31 | 69190 Walldorf (Baden) | Germany
Tel.: +49 (0) 6227 385 257 | Fax: +49 (0) 6227 385 491 | Mobile: +49 172 6205362
[hidden email] |
www.icw.de| www.lifesensor.com



From: "Kamp, Daniel (GE Healthcare)" <[hidden email]>
To: <[hidden email]>
Date: 10.05.2010 20:16
Subject: [Ipf-developer] issues with the CDAR2 DSL (manipulation of address        data)
Sent by: [hidden email]






Good afternoon all,


I am working with the CDAR2 DSL and am having some issues manipulating data in the address data element (e.g., AD).
I have tried both:
   a) handling the object graph directly:
          POCDMT000040ClinicalDocument
             POCDMT000040RecordTarget
                POCDMT000040RecordTarget
                    POCDMT000040PatientRole
                         EList<AD>
   b) and using Groovy (via transmogrification)


What I am trying to do is read in the postal code and modify it.  I am able to get the value, but am unable
to modify it in the object graph.  This is because the object graph representation in the address (AD) element
is:
       AD.postalCode
           where postalCode is an EList<ADXP>.
       I am able to read the postalCode value by accessing it in this way:
             postalCode.getMixed().get(0).getValue();
       However, there is no setter method to set the postal code value.


I have traversed the CDAR2 object graph and see that it is descendent of the
  org.eclipse.emf.ecore
structures (but am not familiar with the handing of eclipse FeatureMaps).


Does anyone have a code snippet that I could use to assign a postalCode a desired value.  I need to
be able to do this through code and directly against the object graph.  I would like to use the CDAR DSL
if I can and do not want to have to create my own.  Any and all help would be greatly appreciated.


Thank you in advance,
Dan Kamp


Dan Kamp
GE Healthcare
Information Technologies - eHealth
Connectivity Solutions Engineering
T (847) 277- 4327
D *567-4327
E
<A href="blocked::mailto:daniel.kamp@ge.com">daniel.kamp@...
<A href="blocked::http://www.gehealthcare.com/">www.gehealthcare.com
_______________________________________________
Ipf-developer mailing list
[hidden email]

http://gforge.openehealth.org/mailman/listinfo/ipf-developer


InterComponentWare AG:
Vorstand: Peter Kirschbauer (Vors.), Jörg Stadler / Aufsichtsratsvors.: Prof. Dr. Christof Hettich
Firmensitz: 69190 Walldorf, Altrottstraße 31 / AG Mannheim HRB 351761 / USt.-IdNr.: DE 198388516
_______________________________________________
Ipf-developer mailing list
[hidden email]
http://gforge.openehealth.org/mailman/listinfo/ipf-developer


InterComponentWare AG:
Vorstand: Peter Kirschbauer (Vors.), Jörg Stadler / Aufsichtsratsvors.: Prof. Dr. Christof Hettich
Firmensitz: 69190 Walldorf, Altrottstraße 31 / AG Mannheim HRB 351761 / USt.-IdNr.: DE 198388516

_______________________________________________
Ipf-developer mailing list
[hidden email]
http://gforge.openehealth.org/mailman/listinfo/ipf-developer