Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
AKTIN
dwh-import
Commits
4a93e222
Commit
4a93e222
authored
May 10, 2018
by
R.W.Majeed
Browse files
method added to extract encounter id
parent
b69b2588
Changes
1
Hide whitespace changes
Inline
Side-by-side
cda-validation/src/main/java/org/aktin/cda/CDAParser.java
View file @
4a93e222
...
@@ -98,6 +98,20 @@ public class CDAParser {
...
@@ -98,6 +98,20 @@ public class CDAParser {
(
String
)
xee
.
evaluate
(
cda
.
getDocumentElement
(),
XPathConstants
.
STRING
)
(
String
)
xee
.
evaluate
(
cda
.
getDocumentElement
(),
XPathConstants
.
STRING
)
};
};
}
}
/**
* Find the encounter id for a given CDA document
* @param cda CDA document
* @return two part encounter id: root, extension
* @throws XPathExpressionException XPath error
*/
public
String
[]
extractEncounterId
(
Document
cda
)
throws
XPathExpressionException
{
XPathExpression
xer
=
xpath
.
compile
(
CDAConstants
.
XPATH_CDA_ENCOUNTER_ID_ROOT
);
XPathExpression
xee
=
xpath
.
compile
(
CDAConstants
.
XPATH_CDA_ENCOUNTER_ID_EXT
);
return
new
String
[]{
(
String
)
xer
.
evaluate
(
cda
.
getDocumentElement
(),
XPathConstants
.
STRING
),
(
String
)
xee
.
evaluate
(
cda
.
getDocumentElement
(),
XPathConstants
.
STRING
)
};
}
/**
/**
* Find the document id for a given CDA document. It should be globally
* Find the document id for a given CDA document. It should be globally
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment