本文整理了Java中org.hl7.fhir.dstu3.model.Identifier.setSystem()
方法的一些代码示例,展示了Identifier.setSystem()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Identifier.setSystem()
方法的具体详情如下:
包路径:org.hl7.fhir.dstu3.model.Identifier
类名称:Identifier
方法名:setSystem
暂无
代码示例来源:origin: jamesagnew/hapi-fhir
id.setSystem("urn:ietf:rfc:3986");
if (isGuid(r))
id.setValue("urn:uuid:"+r);
} else {
if (isGuid(r))
id.setSystem("urn:uuid:"+r);
else if (UriForOid(r) != null)
id.setSystem(UriForOid(r));
else
id.setSystem("urn:oid:"+r);
id.setValue(ex);
代码示例来源:origin: jamesagnew/hapi-fhir
private Identifier readAsIdentifier(Element item) {
Identifier r = new Identifier();
r.setSystem(item.getNamedChildValue("system"));
r.setValue(item.getNamedChildValue("value"));
return r;
}
代码示例来源:origin: jamesagnew/hapi-fhir
patient.addIdentifier().setSystem("urn:mrns").setValue("12345");
patient.addName().setFamily("Smith").addGiven("Tester").addGiven("Q");
代码示例来源:origin: jamesagnew/hapi-fhir
p.addIdentifier().setSystem("urn:foo:identifiers").setValue("12345");
p.addTelecom().setSystem(ContactPointSystem.PHONE).setValue("416 123-4567");
代码示例来源:origin: jamesagnew/hapi-fhir
@Read()
public Patient getResourceById(@IdParam IdType theId) {
Patient retVal = new Patient();
// ...populate...
retVal.addIdentifier().setSystem("urn:mrns").setValue("12345");
retVal.addName().setFamily("Smith").addGiven("Tester").addGiven("Q");
// ...etc...
// if you know the version ID of the resource, you should set it and HAPI will
// include it in a Content-Location header
retVal.setId(new IdType("Patient", "123", "2"));
return retVal;
}
//END SNIPPET: read
代码示例来源:origin: jamesagnew/hapi-fhir
public org.hl7.fhir.dstu3.model.Identifier convertIdentifier(org.hl7.fhir.instance.model.Identifier src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.dstu3.model.Identifier tgt = new org.hl7.fhir.dstu3.model.Identifier();
copyElement(src, tgt);
tgt.setUse(convertIdentifierUse(src.getUse()));
tgt.setType(convertCodeableConcept(src.getType()));
tgt.setSystem(src.getSystem());
tgt.setValue(src.getValue());
tgt.setPeriod(convertPeriod(src.getPeriod()));
tgt.setAssigner(convertReference(src.getAssigner()));
return tgt;
}
代码示例来源:origin: jamesagnew/hapi-fhir
public static org.hl7.fhir.dstu3.model.Identifier convertIdentifier(org.hl7.fhir.dstu2016may.model.Identifier src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.dstu3.model.Identifier tgt = new org.hl7.fhir.dstu3.model.Identifier();
copyElement(src, tgt);
tgt.setUse(convertIdentifierUse(src.getUse()));
tgt.setType(convertCodeableConcept(src.getType()));
if (src.hasSystem())
tgt.setSystem(src.getSystem());
if (src.hasValue())
tgt.setValue(src.getValue());
tgt.setPeriod(convertPeriod(src.getPeriod()));
tgt.setAssigner(convertReference(src.getAssigner()));
return tgt;
}
代码示例来源:origin: jamesagnew/hapi-fhir
patient.addIdentifier().setUse(IdentifierUse.OFFICIAL).setSystem("urn:example").setValue("7000135");
代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu3
public static void setOID(ValueSet vs, String oid) {
if (!oid.startsWith("urn:oid:"))
oid = "urn:oid:" + oid;
for (Identifier id : vs.getIdentifier()) {
if ("urn:ietf:rfc:3986".equals(id.getSystem()) && id.hasValue() && id.getValue().startsWith("urn:oid:")) {
id.setValue(oid);
return;
}
}
vs.addIdentifier().setSystem("urn:ietf:rfc:3986").setValue(oid);
}
代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu3
public static Identifier readAsIdentifier(Element item) {
Identifier r = new Identifier();
r.setSystem(item.getNamedChildValue("system"));
r.setValue(item.getNamedChildValue("value"));
return r;
}
代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-validation
private Identifier readAsIdentifier(Element item) {
Identifier r = new Identifier();
r.setSystem(item.getNamedChildValue("system"));
r.setValue(item.getNamedChildValue("value"));
return r;
}
代码示例来源:origin: FirelyTeam/fhirstarters
public static void main(String[] theArgs) {
// Create a resource instance
Patient pat = new Patient();
// Add a "name" element
HumanName name = pat.addName();
name.setFamily("Simpson").addGiven("Homer").addGiven("J");
// Add an "identifier" element
Identifier identifier = pat.addIdentifier();
identifier.setSystem("http://acme.org/MRNs").setValue("7000135");
// Model is designed to be chained
pat.addIdentifier().setSystem("http://acme.org/MRNs").setValue("12345");
}
}
代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-structures-dstu3
public static void setOID(CodeSystem cs, String oid) {
if (!oid.startsWith("urn:oid:"))
oid = "urn:oid:" + oid;
if (!cs.hasIdentifier())
cs.setIdentifier(new Identifier().setSystem("urn:ietf:rfc:3986").setValue(oid));
else if ("urn:ietf:rfc:3986".equals(cs.getIdentifier().getSystem()) && cs.getIdentifier().hasValue() && cs.getIdentifier().getValue().startsWith("urn:oid:"))
cs.getIdentifier().setValue(oid);
else
throw new Error("unable to set OID on code system");
}
代码示例来源:origin: FirelyTeam/fhirstarters
public static void main(String[] theArgs) {
// Create a resource instance
Patient pat = new Patient();
// Add a "name" element
HumanName name = pat.addName();
name.setFamily("Simpson").addGiven("Homer").addGiven("J");
// Add an "identifier" element
Identifier identifier = pat.addIdentifier();
identifier.setSystem("http://acme.org/MRNs").setValue("7000135");
// Model is designed to be chained
pat.addIdentifier().setSystem("http://acme.org/MRNs").setValue("12345");
}
}
代码示例来源:origin: FirelyTeam/fhirstarters
public static void main(String[] args) {
// Create an encounter with an invalid status and no class
Patient pat = new Patient();
pat.addName().setFamily("Simpson").addGiven("Homer").addGiven("Jay");
pat.addAddress().addLine("342 Evergreen Terrace").addLine("Springfield");
pat.addIdentifier().setSystem("http://acme.org/mrns").setValue("12345");
// Create a new context and enable the narrative generator
FhirContext ctx = FhirContext.forDstu2();
ctx.setNarrativeGenerator(new DefaultThymeleafNarrativeGenerator());
String res = ctx.newJsonParser().setPrettyPrint(true).encodeResourceToString(pat);
System.out.println(res);
}
代码示例来源:origin: FirelyTeam/fhirstarters
public static void main(String[] theArgs) {
// Create a Patient
Patient pat = new Patient();
pat.addName().setFamily("Simpson").addGiven("Homer").addGiven("J");
pat.addIdentifier().setSystem("http://acme.org/MRNs").setValue("7000135");
pat.addTelecom().setUse(ContactPointUse.HOME).setSystem(ContactPointSystem.PHONE).setValue("1 (416) 340-4800");
pat.setGender(AdministrativeGender.MALE);
// Create a context
FhirContext ctx = FhirContext.forDstu3();
// Create a JSON parser
IParser parser = ctx.newJsonParser();
parser.setPrettyPrint(true);
String encode = parser.encodeResourceToString(pat);
System.out.println(encode);
}
}
代码示例来源:origin: FirelyTeam/fhirstarters
public static void main(String[] theArgs) {
Patient pat = new Patient();
pat.addName().setFamily("Simpson").addGiven("Homer").addGiven("J");
pat.addIdentifier().setSystem("http://acme.org/MRNs").setValue("7000135");
// Enumerated types are provided for many coded elements
ContactPoint contact = pat.addTelecom();
contact.setUse(ContactPoint.ContactPointUse.HOME);
contact.setSystem(ContactPoint.ContactPointSystem.PHONE);
contact.setValue("1 (416) 340-4800");
pat.setGender(Enumerations.AdministrativeGender.MALE);
}
}
代码示例来源:origin: FirelyTeam/fhirstarters
public static void main(String[] theArgs) {
Patient pat = new Patient();
pat.addName().setFamily("Simpson").addGiven("Homer").addGiven("J");
pat.addIdentifier().setSystem("http://acme.org/MRNs").setValue("7000135");
// Enumerated types are provided for many coded elements
ContactPoint contact = pat.addTelecom();
contact.setUse(ContactPoint.ContactPointUse.HOME);
contact.setSystem(ContactPoint.ContactPointSystem.PHONE);
contact.setValue("1 (416) 340-4800");
pat.setGender(Enumerations.AdministrativeGender.MALE);
}
}
代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-converter
public org.hl7.fhir.dstu3.model.Identifier convertIdentifier(org.hl7.fhir.instance.model.Identifier src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.dstu3.model.Identifier tgt = new org.hl7.fhir.dstu3.model.Identifier();
copyElement(src, tgt);
tgt.setUse(convertIdentifierUse(src.getUse()));
tgt.setType(convertCodeableConcept(src.getType()));
tgt.setSystem(src.getSystem());
tgt.setValue(src.getValue());
tgt.setPeriod(convertPeriod(src.getPeriod()));
tgt.setAssigner(convertReference(src.getAssigner()));
return tgt;
}
代码示例来源:origin: ca.uhn.hapi.fhir/hapi-fhir-converter
public static org.hl7.fhir.dstu3.model.Identifier convertIdentifier(org.hl7.fhir.dstu2016may.model.Identifier src) throws FHIRException {
if (src == null || src.isEmpty())
return null;
org.hl7.fhir.dstu3.model.Identifier tgt = new org.hl7.fhir.dstu3.model.Identifier();
copyElement(src, tgt);
tgt.setUse(convertIdentifierUse(src.getUse()));
tgt.setType(convertCodeableConcept(src.getType()));
if (src.hasSystem())
tgt.setSystem(src.getSystem());
if (src.hasValue())
tgt.setValue(src.getValue());
tgt.setPeriod(convertPeriod(src.getPeriod()));
tgt.setAssigner(convertReference(src.getAssigner()));
return tgt;
}
内容来源于网络,如有侵权,请联系作者删除!