public object Translate(TranslationContext context, ASTNode node) { var result = new CREFModel.ListExpression(); foreach (var child in node.Children) { result.Items.Add(context.TranslateNode(child)); } return(result); }
public object TransformModelPath(TranslationContext context, ObjectType sourceType, ASTNode node, string path) { switch (path) { case "use": { // Translate access to use as a list, because it is a list in the vMR representation var list = new CREFModel.ListExpression(); list.Items.Add(GetPropertyExpression(context, node, "AddressType")); return(list); } case "part": default: throw new NotImplementedException("Access to the part element is not yet implemented."); } }
public object Translate(TranslationContext context, ASTNode node) { var result = new CREFModel.ListExpression(); foreach (var child in node.Children) { result.Items.Add(context.TranslateNode(child)); } return result; }
public object TransformModelPath(TranslationContext context, ObjectType sourceType, ASTNode node, string path) { switch (path) { // ClinicalStatement // templateId : List<CodedIdentifier> // id : II case "id" : return TranslateIdReference(context, sourceType, node, path); // dataSourceType : CD // evaluatedPersonId : II // extension : List<CodedNameValuePair> // ObservationBase // observationFocus : CD case "observationFocus" : return TranslateCodeReference(context, sourceType, node, path); // observationMethod : CD // targetBodySite : BodySite // ObservationOrder // criticality : CD // orderEventTime : IVL_TS // observationTime : IVL_TS // repeatNumber : INT // relatedEntity : List<RelatedEntity> // relatedClinicalStatement : List<RelatedClinicalStatement> // ObservationProposal // criticality : CD // proposedObservationTime : IVL_TS // repeatNumber : INT // relatedEntity : List<RelatedEntity> // relatedClinicalStatement : List<RelatedClinicalStatement> // ObservationResult // observationEventTime : IVL_TS case "observationEventTime" : return GetPropertyExpression(context, node, "ResultDateTime"); // with Interval selector? // observationValue : ANY case "observationValue" : return GetPropertyExpression(context, node, "Value"); // interpretation : List<CD> case "interpretation" : { var list = new CREFModel.ListExpression(); list.Items.Add(GetPropertyExpression(context, node, "Interpretation")); // TODO: Interpretation mapping? return list; } // relatedEntity : List<RelatedEntity> // relatedClinicalStatement : List<RelatedClinicalStatement> // UnconductedObservation // reason : CD // subjectEffectiveTime : IVL_TS // documentationTime : IVL_TS // relatedEntity : List<RelatedEntity> // relatedClinicalStatement : List<RelatedClinicalStatement> default: throw new NotSupportedException(String.Format("Referenced property ({0}.{1}) does not have an equivalent CREF representation.", sourceType.Name, path)); } }
public object TransformModelPath(TranslationContext context, ObjectType sourceType, ASTNode node, string path) { switch (path) { case "use" : { // Translate access to use as a list, because it is a list in the vMR representation var list = new CREFModel.ListExpression(); list.Items.Add(GetPropertyExpression(context, node, "AddressType")); return list; } case "part" : default : throw new NotImplementedException("Access to the part element is not yet implemented."); } }
public object TransformModelPath(TranslationContext context, ObjectType sourceType, ASTNode node, string path) { switch (path) { // ClinicalStatement // templateId : List<CodedIdentifier> // id : II case "id": return(TranslateIdReference(context, sourceType, node, path)); // dataSourceType : CD // evaluatedPersonId : II // extension : List<CodedNameValuePair> // ObservationBase // observationFocus : CD case "observationFocus": return(TranslateCodeReference(context, sourceType, node, path)); // observationMethod : CD // targetBodySite : BodySite // ObservationOrder // criticality : CD // orderEventTime : IVL_TS // observationTime : IVL_TS // repeatNumber : INT // relatedEntity : List<RelatedEntity> // relatedClinicalStatement : List<RelatedClinicalStatement> // ObservationProposal // criticality : CD // proposedObservationTime : IVL_TS // repeatNumber : INT // relatedEntity : List<RelatedEntity> // relatedClinicalStatement : List<RelatedClinicalStatement> // ObservationResult // observationEventTime : IVL_TS case "observationEventTime": return(GetPropertyExpression(context, node, "ResultDateTime")); // with Interval selector? // observationValue : ANY case "observationValue": return(GetPropertyExpression(context, node, "Value")); // interpretation : List<CD> case "interpretation": { var list = new CREFModel.ListExpression(); list.Items.Add(GetPropertyExpression(context, node, "Interpretation")); // TODO: Interpretation mapping? return(list); } // relatedEntity : List<RelatedEntity> // relatedClinicalStatement : List<RelatedClinicalStatement> // UnconductedObservation // reason : CD // subjectEffectiveTime : IVL_TS // documentationTime : IVL_TS // relatedEntity : List<RelatedEntity> // relatedClinicalStatement : List<RelatedClinicalStatement> default: throw new NotSupportedException(String.Format("Referenced property ({0}.{1}) does not have an equivalent CREF representation.", sourceType.Name, path)); } }