public override AuthoringScope ParseSource(ParseRequest req) { if (req == null) { return(null); } var scope = new CQLAuthoringScope(); req.Scope = scope; if (req.Reason == ParseReason.Check) { } if (m_scanner != null && req.Reason == ParseReason.MemberSelect || req.Reason == ParseReason.MemberSelectAndHighlightBraces && req.TokenInfo != null) { var token = m_scanner.GetToken(req.TokenInfo.Token); if (token != null) { if (token.Type == 4) // [ { scope.AddDeclaration(new CQLDeclaration("Encounter", 0, "An encounter with the patient")); scope.AddDeclaration(new CQLDeclaration("Procedure", 0, "A procedure")); scope.AddDeclaration(new CQLDeclaration("Medication", 0, "A medication")); } if (token.Type == 3) // , { scope.AddDeclaration(new CQLDeclaration("Performed", 0, "An action performed")); scope.AddDeclaration(new CQLDeclaration("Proposed", 0, "An action performed")); scope.AddDeclaration(new CQLDeclaration("Ordered", 0, "An action performed")); } if (token.Type == 5) // : { scope.AddDeclaration(new CQLDeclaration("\"Inpatient\"", 0, "Inpatient encounter")); scope.AddDeclaration(new CQLDeclaration("\"Outpatient\"", 0, "Outpatient encounter")); scope.AddDeclaration(new CQLDeclaration("\"Face-to-face Interaction\"", 0, "Face-to-face interaction")); } } } return(scope); }
public override AuthoringScope ParseSource(ParseRequest req) { if (req == null) { return null; } var scope = new CQLAuthoringScope(); req.Scope = scope; if (req.Reason == ParseReason.Check) { } if (m_scanner != null && req.Reason == ParseReason.MemberSelect || req.Reason == ParseReason.MemberSelectAndHighlightBraces && req.TokenInfo != null) { var token = m_scanner.GetToken(req.TokenInfo.Token); if (token != null) { if (token.Type == 4) // [ { scope.AddDeclaration(new CQLDeclaration("Encounter", 0, "An encounter with the patient")); scope.AddDeclaration(new CQLDeclaration("Procedure", 0, "A procedure")); scope.AddDeclaration(new CQLDeclaration("Medication", 0, "A medication")); } if (token.Type == 3) // , { scope.AddDeclaration(new CQLDeclaration("Performed", 0, "An action performed")); scope.AddDeclaration(new CQLDeclaration("Proposed", 0, "An action performed")); scope.AddDeclaration(new CQLDeclaration("Ordered", 0, "An action performed")); } if (token.Type == 5) // : { scope.AddDeclaration(new CQLDeclaration("\"Inpatient\"", 0, "Inpatient encounter")); scope.AddDeclaration(new CQLDeclaration("\"Outpatient\"", 0, "Outpatient encounter")); scope.AddDeclaration(new CQLDeclaration("\"Face-to-face Interaction\"", 0, "Face-to-face interaction")); } } } return scope; }