use of org.hl7.fhir.r4b.model.Address in project org.hl7.fhir.core by hapifhir.
the class ToolsHelper method generateSnapshots.
private void generateSnapshots(String[] args) throws IOException, FHIRException {
if (args.length == 1) {
System.out.println("tools.jar snapshot-maker [source] -defn [definitions]");
System.out.println("");
System.out.println("Generates a snapshot from a differential. The nominated profile must have a single struture that has a differential");
System.out.println("");
System.out.println("source - the profile to generate the snapshot for. Maybe a file name, or a URL reference to a server running FHIR RESTful API");
System.out.println("definitions - filename for local copy of the validation.zip file");
}
String address = args[1];
String definitions = args[3];
SimpleWorkerContext context = SimpleWorkerContext.fromDefinitions(getDefinitions(definitions));
// } else {
throw new NotImplementedException("generating snapshots not done yet (address = " + address + ")");
// }
}
use of org.hl7.fhir.r4b.model.Address in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeAuditEventAuditEventAgentNetworkComponent.
protected void composeAuditEventAuditEventAgentNetworkComponent(Complex parent, String parentType, String name, AuditEvent.AuditEventAgentNetworkComponent element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeBackboneElement(t, "network", name, element, index);
if (element.hasAddressElement())
composeString(t, "AuditEvent", "address", element.getAddressElement(), -1);
if (element.hasTypeElement())
composeEnum(t, "AuditEvent", "type", element.getTypeElement(), -1);
}
use of org.hl7.fhir.r4b.model.Address in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composePerson.
protected void composePerson(Complex parent, String parentType, String name, Person element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeDomainResource(t, "Person", name, element, index);
for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "Person", "identifier", element.getIdentifier().get(i), i);
for (int i = 0; i < element.getName().size(); i++) composeHumanName(t, "Person", "name", element.getName().get(i), i);
for (int i = 0; i < element.getTelecom().size(); i++) composeContactPoint(t, "Person", "telecom", element.getTelecom().get(i), i);
if (element.hasGenderElement())
composeEnum(t, "Person", "gender", element.getGenderElement(), -1);
if (element.hasBirthDateElement())
composeDate(t, "Person", "birthDate", element.getBirthDateElement(), -1);
for (int i = 0; i < element.getAddress().size(); i++) composeAddress(t, "Person", "address", element.getAddress().get(i), i);
if (element.hasPhoto())
composeAttachment(t, "Person", "photo", element.getPhoto(), -1);
if (element.hasManagingOrganization())
composeReference(t, "Person", "managingOrganization", element.getManagingOrganization(), -1);
if (element.hasActiveElement())
composeBoolean(t, "Person", "active", element.getActiveElement(), -1);
for (int i = 0; i < element.getLink().size(); i++) composePersonPersonLinkComponent(t, "Person", "link", element.getLink().get(i), i);
}
use of org.hl7.fhir.r4b.model.Address in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composePatient.
protected void composePatient(Complex parent, String parentType, String name, Patient element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeDomainResource(t, "Patient", name, element, index);
for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "Patient", "identifier", element.getIdentifier().get(i), i);
if (element.hasActiveElement())
composeBoolean(t, "Patient", "active", element.getActiveElement(), -1);
for (int i = 0; i < element.getName().size(); i++) composeHumanName(t, "Patient", "name", element.getName().get(i), i);
for (int i = 0; i < element.getTelecom().size(); i++) composeContactPoint(t, "Patient", "telecom", element.getTelecom().get(i), i);
if (element.hasGenderElement())
composeEnum(t, "Patient", "gender", element.getGenderElement(), -1);
if (element.hasBirthDateElement())
composeDate(t, "Patient", "birthDate", element.getBirthDateElement(), -1);
if (element.hasDeceased())
composeType(t, "Patient", "deceased", element.getDeceased(), -1);
for (int i = 0; i < element.getAddress().size(); i++) composeAddress(t, "Patient", "address", element.getAddress().get(i), i);
if (element.hasMaritalStatus())
composeCodeableConcept(t, "Patient", "maritalStatus", element.getMaritalStatus(), -1);
if (element.hasMultipleBirth())
composeType(t, "Patient", "multipleBirth", element.getMultipleBirth(), -1);
for (int i = 0; i < element.getPhoto().size(); i++) composeAttachment(t, "Patient", "photo", element.getPhoto().get(i), i);
for (int i = 0; i < element.getContact().size(); i++) composePatientContactComponent(t, "Patient", "contact", element.getContact().get(i), i);
if (element.hasAnimal())
composePatientAnimalComponent(t, "Patient", "animal", element.getAnimal(), -1);
for (int i = 0; i < element.getCommunication().size(); i++) composePatientPatientCommunicationComponent(t, "Patient", "communication", element.getCommunication().get(i), i);
for (int i = 0; i < element.getGeneralPractitioner().size(); i++) composeReference(t, "Patient", "generalPractitioner", element.getGeneralPractitioner().get(i), i);
if (element.hasManagingOrganization())
composeReference(t, "Patient", "managingOrganization", element.getManagingOrganization(), -1);
for (int i = 0; i < element.getLink().size(); i++) composePatientPatientLinkComponent(t, "Patient", "link", element.getLink().get(i), i);
}
use of org.hl7.fhir.r4b.model.Address in project org.hl7.fhir.core by hapifhir.
the class RdfParser method composeLocation.
protected void composeLocation(Complex parent, String parentType, String name, Location element, int index) {
if (element == null)
return;
Complex t;
if (Utilities.noString(parentType))
t = parent;
else {
t = parent.predicate("fhir:" + parentType + '.' + name);
}
composeDomainResource(t, "Location", name, element, index);
for (int i = 0; i < element.getIdentifier().size(); i++) composeIdentifier(t, "Location", "identifier", element.getIdentifier().get(i), i);
if (element.hasStatusElement())
composeEnum(t, "Location", "status", element.getStatusElement(), -1);
if (element.hasOperationalStatus())
composeCoding(t, "Location", "operationalStatus", element.getOperationalStatus(), -1);
if (element.hasNameElement())
composeString(t, "Location", "name", element.getNameElement(), -1);
for (int i = 0; i < element.getAlias().size(); i++) composeString(t, "Location", "alias", element.getAlias().get(i), i);
if (element.hasDescriptionElement())
composeString(t, "Location", "description", element.getDescriptionElement(), -1);
if (element.hasModeElement())
composeEnum(t, "Location", "mode", element.getModeElement(), -1);
if (element.hasType())
composeCodeableConcept(t, "Location", "type", element.getType(), -1);
for (int i = 0; i < element.getTelecom().size(); i++) composeContactPoint(t, "Location", "telecom", element.getTelecom().get(i), i);
if (element.hasAddress())
composeAddress(t, "Location", "address", element.getAddress(), -1);
if (element.hasPhysicalType())
composeCodeableConcept(t, "Location", "physicalType", element.getPhysicalType(), -1);
if (element.hasPosition())
composeLocationLocationPositionComponent(t, "Location", "position", element.getPosition(), -1);
if (element.hasManagingOrganization())
composeReference(t, "Location", "managingOrganization", element.getManagingOrganization(), -1);
if (element.hasPartOf())
composeReference(t, "Location", "partOf", element.getPartOf(), -1);
for (int i = 0; i < element.getEndpoint().size(); i++) composeReference(t, "Location", "endpoint", element.getEndpoint().get(i), i);
}
Aggregations