-
Notifications
You must be signed in to change notification settings - Fork 124
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Apply private access modifier (#1239)
* add test for private access modifier * add impl for private access modifier * rectify test function name * cover private access for parameter, codesystem, valueset, code, concept, function, expression * identify possible bug * enable tests after the merged fix
- Loading branch information
mdnazmulkarim
authored
Oct 18, 2023
1 parent
a47cfc8
commit cc89145
Showing
5 changed files
with
137 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...to-elm/src/test/resources/org/cqframework/cql/cql2elm/LibraryTests/AccessModifierBase.cql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
library AccessModifierBase | ||
|
||
private codesystem "ICD-10:2014": 'ICD-10' version '2014' | ||
|
||
private codesystem "SNOMED-CT:2020": 'http://snomed.info/sct' version '2020' | ||
private codesystem "ICD-9CM:2020": '2.16.840.1.113883.6.103' version '2020' | ||
|
||
private code "XYZ Code": 'XYZ' from "SNOMED-CT:2020" display 'XYZ Code' | ||
private code "ABC Code": 'ABC' from "ICD-9CM:2020" display 'ABC Code' | ||
|
||
private concept "XYZ Concept": { "XYZ Code", "ABC Code" } display 'XYZ Concept' | ||
|
||
private valueset "Female Administrative Sex": '2.16.840.1.113883.3.560.100.2' | ||
|
||
private parameter "Test Parameter" Integer | ||
|
||
define private function f1(arg String): arg | ||
|
||
define private PrivateExpression: Tuple { Id : '12345', Name : 'John Doe' } |
44 changes: 44 additions & 0 deletions
44
.../test/resources/org/cqframework/cql/cql2elm/LibraryTests/AccessModifierNonReferencing.cql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
library AccessModifierNonReferencing | ||
|
||
//********private member definition begin********** | ||
private codesystem "ICD-10:2014": 'ICD-10' version '2014' | ||
private codesystem "SNOMED-CT:2020": 'http://snomed.info/sct' version '2020' | ||
private codesystem "ICD-9CM:2020": '2.16.840.1.113883.6.103' version '2020' | ||
private code "XYZ Code": 'XYZ' from "SNOMED-CT:2020" display 'XYZ Code' | ||
private code "ABC Code": 'ABC' from "ICD-9CM:2020" display 'ABC Code' | ||
private concept "XYZ Concept": { "XYZ Code", "ABC Code" } display 'XYZ Concept' | ||
private valueset "Female Administrative Sex": '2.16.840.1.113883.3.560.100.2' | ||
//private member access for codesystem | ||
valueset "Chlamydia Screening": '2.16.840.1.113883.3.464.1003.110.12.1052' | ||
codesystems { "ICD-10:2014" } | ||
private parameter "Test Parameter" Integer | ||
define private function f1(arg String): arg | ||
define private PrivateExpression: Tuple { Id : '12345', Name : 'John Doe' } | ||
//********private member definition end********** | ||
//private member access for function | ||
define FunctionTestOuterPrivate: f1('hello') | ||
//private member access for expressionDef | ||
define ReferenceExpression: PrivateExpression.Id | ||
//private member access for parameter | ||
define "Test Definition": "Test Parameter" | ||
//private member access for valueset | ||
define GenderExpression: 'Female' in "Female Administrative Sex" | ||
//private member access for code | ||
define CodeRef: "XYZ Code" | ||
//private member access for concept | ||
define ConceptRef: "XYZ Concept" | ||
26 changes: 26 additions & 0 deletions
26
...src/test/resources/org/cqframework/cql/cql2elm/LibraryTests/AccessModifierReferencing.cql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
library AccessModifierReferencing | ||
|
||
include AccessModifierBase called Base | ||
|
||
//private member access for codesystem | ||
valueset "Chlamydia Screening": '2.16.840.1.113883.3.464.1003.110.12.1052' | ||
codesystems { Base."ICD-10:2014" } | ||
|
||
//private member access for function | ||
define FunctionTestOuterPrivate: Base.f1('hello') | ||
|
||
//private member access for expressionDef | ||
define ReferenceExpression: Base.PrivateExpression.Id | ||
|
||
//private member access for parameter | ||
define "Test Definition": Base."Test Parameter" | ||
|
||
//private member access for valueset | ||
define GenderExpression: 'Female' in Base."Female Administrative Sex" | ||
|
||
//private member access for code | ||
define CodeRef: Base."XYZ Code" | ||
|
||
//private member access for concept | ||
define ConceptRef: Base."XYZ Concept" | ||
|