Hi,
I am trying to get the (full!) concept name for a parsed archetype.
The best I can come up with is:
String conceptName="";
List<ArchetypeTerm> terms =
myArchetype.getOntology().getTermDefinitionsList().get(0).getDefinitions
();
for (int i=0; i< terms.size(); i++) {
if (terms.get(i).getCode().equals(myArchetype.getConcept())) {
conceptName= terms.get(i).getItem(ArchetypeTerm.TEXT);
break;
}
}
Note that this doesn't even take into account the language I want it in,
I just take the first language I come across (0), otherwise the code
would further blow up.
Is there a smarter way to do this...in essence something like an indexOf
for the Code only, not the full ArchetypeTerm?
Or a convenience method like String getArchetypeTermText(String code,
String language)?
Am I missing something?
Regards
Sebastian
Dr Sebastian Garde
Dr. sc. hum., Dipl.-Inform. Med, FACHI
Faculty of Business and Informatics, Central Queensland University
Austin Centre for Applied Clinical Informatics, Austin Health
Heidelberg Vic 3084, Australia
s.garde@cqu.edu.au <mailto:s.garde@cqu.edu.au>
Ph: +61 (0)3 9496 4040
Fax: +61 (0)3 9496 4224
http://healthinformatics.cqu.edu.au
http://www.acaci.org.au
Visit the new open access electronic Journal of Health Informatics
(eJHI): http://ejhi.net/>