R4B fixes
This commit is contained in:
parent
455cc5cf7f
commit
67d3ab72e3
|
@ -6568,7 +6568,7 @@ The primary difference between a medicationusage and a medicationadministration
|
|||
*/
|
||||
NULL;
|
||||
|
||||
public static final FHIRVersion R4B = FHIRVersion._4_0_1;
|
||||
public static final FHIRVersion R4B = FHIRVersion._4_1_0;
|
||||
|
||||
public static FHIRVersion fromCode(String codeString) throws FHIRException {
|
||||
if (codeString == null || "".equals(codeString))
|
||||
|
@ -6826,7 +6826,7 @@ public String toCode(int len) {
|
|||
}
|
||||
|
||||
public boolean isR4B() {
|
||||
return toCode().startsWith("4.0");
|
||||
return toCode().startsWith("4.1");
|
||||
}
|
||||
// end addition
|
||||
}
|
||||
|
|
|
@ -67,10 +67,12 @@ public class GraphQLSchemaGenerator {
|
|||
private static final String INNER_TYPE_NAME = "gql.type.name";
|
||||
IWorkerContext context;
|
||||
private ProfileUtilities profileUtilities;
|
||||
private String version;
|
||||
|
||||
public GraphQLSchemaGenerator(IWorkerContext context) {
|
||||
public GraphQLSchemaGenerator(IWorkerContext context, String version) {
|
||||
super();
|
||||
this.context = context;
|
||||
this.version = version;
|
||||
profileUtilities = new ProfileUtilities(context, null, null);
|
||||
}
|
||||
|
||||
|
@ -87,7 +89,7 @@ public class GraphQLSchemaGenerator {
|
|||
tl.put(sd.getName(), sd);
|
||||
}
|
||||
}
|
||||
writer.write("# FHIR GraphQL Schema. Version "+Constants.VERSION+"\r\n\r\n");
|
||||
writer.write("# FHIR GraphQL Schema. Version "+version+"\r\n\r\n");
|
||||
writer.write("# FHIR Defined Primitive types\r\n");
|
||||
for (String n : sorted(pl.keySet()))
|
||||
generatePrimitive(writer, pl.get(n));
|
||||
|
@ -107,7 +109,7 @@ public class GraphQLSchemaGenerator {
|
|||
|
||||
public void generateResource(OutputStream stream, StructureDefinition sd, List<SearchParameter> parameters, EnumSet<FHIROperationType> operations) throws IOException, FHIRException {
|
||||
BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(stream));
|
||||
writer.write("# FHIR GraphQL Schema. Version "+Constants.VERSION+"\r\n\r\n");
|
||||
writer.write("# FHIR GraphQL Schema. Version "+version+"\r\n\r\n");
|
||||
writer.write("# import the types from 'types.graphql'\r\n\r\n");
|
||||
generateType(writer, sd);
|
||||
if (operations.contains(FHIROperationType.READ))
|
||||
|
|
|
@ -276,6 +276,8 @@ public class NPMPackageGenerator {
|
|||
return "hl7.fhir.r3.core";
|
||||
if (v.startsWith("4.0"))
|
||||
return "hl7.fhir.r4.core";
|
||||
if (v.startsWith("4.1"))
|
||||
return "hl7.fhir.r4b.core";
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -111,7 +111,7 @@ public class TypesUtilities {
|
|||
res.add(new WildcardInformation("id", TypeClassification.PRIMITIVE));
|
||||
res.add(new WildcardInformation("instant", TypeClassification.PRIMITIVE));
|
||||
res.add(new WildcardInformation("integer", TypeClassification.PRIMITIVE));
|
||||
if (!version.startsWith("4.0")) {
|
||||
if (!version.startsWith("4.1")) {
|
||||
res.add(new WildcardInformation("integer64", TypeClassification.PRIMITIVE));
|
||||
}
|
||||
res.add(new WildcardInformation("markdown", TypeClassification.PRIMITIVE));
|
||||
|
|
Loading…
Reference in New Issue