Last change
on this file since 507 was 507, checked in by George Lilly, 15 years ago |
NHIN gateway and adaptor for use on linux with VistA EHR and RPMS
|
File size:
798 bytes
|
Rev | Line | |
---|
[507] | 1 | /*
|
---|
| 2 | * To change this template, choose Tools | Templates
|
---|
| 3 | * and open the template in the editor.
|
---|
| 4 | */
|
---|
| 5 | package gov.hhs.fha.nhinc.common.patientcorrelationfacade.dte.helpers;
|
---|
| 6 |
|
---|
| 7 | import org.hl7.v3.II;
|
---|
| 8 |
|
---|
| 9 | /**
|
---|
| 10 | *
|
---|
| 11 | * @author rayj
|
---|
| 12 | */
|
---|
| 13 | public class UniqueIdHelper {
|
---|
| 14 |
|
---|
| 15 | public static II createUniqueId(String root) {
|
---|
| 16 | II uniqueId = new II();
|
---|
| 17 | String value;
|
---|
| 18 |
|
---|
| 19 | value = generateUID();
|
---|
| 20 | uniqueId.setRoot(root); //todo: refactor
|
---|
| 21 | uniqueId.setExtension(value);
|
---|
| 22 |
|
---|
| 23 | return uniqueId;
|
---|
| 24 | }
|
---|
| 25 |
|
---|
| 26 | public static II createUniqueId() {
|
---|
| 27 | String myRoot = Configuration.getMyCommunityId();
|
---|
| 28 | return createUniqueId(myRoot);
|
---|
| 29 |
|
---|
| 30 | }
|
---|
| 31 |
|
---|
| 32 | private static String generateUID() {
|
---|
| 33 | java.rmi.server.UID uid = new java.rmi.server.UID();
|
---|
| 34 | return uid.toString();
|
---|
| 35 | }
|
---|
| 36 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.