
Package org.hl7.fhir.r5.testfactory
Class ProfileBasedFactory
java.lang.Object
org.hl7.fhir.r5.testfactory.ProfileBasedFactory
see https://build.fhir.org/ig/FHIR/ig-guidance/testfactory.html for doco
-
Constructor Summary
ConstructorsConstructorDescriptionProfileBasedFactory(FHIRPathEngine fpe, String baseDataSource) ProfileBasedFactory(FHIRPathEngine fpe, String baseDataSource, TableDataProvider data, Map<String, TestDataFactory.DataTable> tables, org.hl7.fhir.utilities.json.model.JsonArray mappings) -
Method Summary
Modifier and TypeMethodDescriptionevaluateExpression(List<String> log, org.hl7.fhir.utilities.json.model.JsonElement expression, String name) generate(StructureDefinition profile) byte[]generateFormat(StructureDefinition profile, Manager.FhirFormat format) getBaseComplexValue(org.hl7.fhir.r5.testfactory.ProfileBasedFactory.LogSet ls, PEDefinition pe, String path, Element b) getBasePrimitiveValue(org.hl7.fhir.r5.testfactory.ProfileBasedFactory.LogSet ls, PEDefinition pe, String path, Element b) getLog()booleanbooleanvoidmakeChildElement(Element element, PEDefinition pe, int level, String path, Map<String, String> values, org.hl7.fhir.r5.testfactory.ProfileBasedFactory.LogSet ls) makeUUID()protected voidpopulateByProfile(Element element, PEDefinition definition, int level, String path, Map<String, String> values) voidpopulateElement(Element element, PEDefinition pe, int level, String path, Map<String, String> values) voidsetLog(PrintStream log) voidsetMarkProfile(boolean markProfile) voidsetTesting(boolean testing)
-
Constructor Details
-
ProfileBasedFactory
public ProfileBasedFactory(FHIRPathEngine fpe, String baseDataSource) throws org.hl7.fhir.utilities.json.JsonException, IOException, SQLException - Throws:
org.hl7.fhir.utilities.json.JsonExceptionIOExceptionSQLException
-
ProfileBasedFactory
public ProfileBasedFactory(FHIRPathEngine fpe, String baseDataSource, TableDataProvider data, Map<String, TestDataFactory.DataTable> tables, org.hl7.fhir.utilities.json.model.JsonArray mappings) throws org.hl7.fhir.utilities.json.JsonException, IOException, SQLException- Throws:
org.hl7.fhir.utilities.json.JsonExceptionIOExceptionSQLException
-
-
Method Details
-
generateFormat
public byte[] generateFormat(StructureDefinition profile, Manager.FhirFormat format) throws org.hl7.fhir.exceptions.FHIRException, IOException, SQLException - Throws:
org.hl7.fhir.exceptions.FHIRExceptionIOExceptionSQLException
-
generate
public Element generate(StructureDefinition profile) throws org.hl7.fhir.exceptions.FHIRException, IOException, SQLException - Throws:
org.hl7.fhir.exceptions.FHIRExceptionIOExceptionSQLException
-
populateByProfile
protected void populateByProfile(Element element, PEDefinition definition, int level, String path, Map<String, String> values) throws SQLException, IOException- Throws:
SQLExceptionIOException
-
populateElement
public void populateElement(Element element, PEDefinition pe, int level, String path, Map<String, String> values) throws SQLException, IOException- Throws:
SQLExceptionIOException
-
makeChildElement
public void makeChildElement(Element element, PEDefinition pe, int level, String path, Map<String, String> values, org.hl7.fhir.r5.testfactory.ProfileBasedFactory.LogSet ls) throws SQLException, IOException- Throws:
SQLExceptionIOException
-
makeUUID
-
getBaseComplexValue
public Map<String,String> getBaseComplexValue(org.hl7.fhir.r5.testfactory.ProfileBasedFactory.LogSet ls, PEDefinition pe, String path, Element b) throws SQLException - Throws:
SQLException
-
getBasePrimitiveValue
public String getBasePrimitiveValue(org.hl7.fhir.r5.testfactory.ProfileBasedFactory.LogSet ls, PEDefinition pe, String path, Element b) throws SQLException - Throws:
SQLException
-
evaluateExpression
public String evaluateExpression(List<String> log, org.hl7.fhir.utilities.json.model.JsonElement expression, String name) -
getLog
-
setLog
-
isTesting
-
setTesting
-
isMarkProfile
-
setMarkProfile
-