This wiki has undergone a migration to Confluence found Here
<meta name="googlebot" content="noindex">

Static Model BNF Grammar

From HL7Wiki
Jump to navigation Jump to search

for RMIM attribute rendering

attribute            ::= attName “: “ type “ “ cardinality defaultValue? hl7Metadata
attName              ::= lowerCamelCase
type                 ::= typeBase flavorExtension? ( “(“ typeArguments “)” )?
typeBase             ::= ( ‘A’-‘Z’ )+
flavorExtension      ::= ( “.” typeBase )+
typeArguments        ::= type ( “,” type )*
cardinality          ::= “[“ number ”..” numberOrStar “] “
numberOrStar         ::= (number | "*")
defaultValue         ::= “= “ anyDefaultText
hl7Metadata          ::= “ { “ mandatoryConf (vocabBinding | fixedValue | enumeration | allowedRange | lengthLimits)? 
                         updateMode? extensionOid? businessNames? “ }”

mandatoryConf        ::= “M”  (* isMandatory = true, required *)
                       | “R”  (* isMandatory = false, required *)
                       | “NP” (* isMandatory = false, not permitted *)
                       | “I”  (* isMandatory = false, ignored *)
                       | “U”  (* isMandatory = false, unspecified *)

vocabBinding         ::= conceptDomainBinding | valueSetBinding | codeBinding
conceptDomainBinding ::= “ < D:” ( domainName | ( “x_” domainName ) )
domainName           ::= upperCamelCase
valueSetBinding      ::= valueSetFull 	(* used for all non-immutable codes *)
                       | valueSetShort	(* used for all immutable codes  *)

valueSetFull         ::= “ < V:” ( valueSetName | oid ) valueSetVersion? strength
valueSetShort        ::= valueSetLT | valueSetLE
valueSetLT           ::= “ < “ ( ‘A’-‘Z’ )+   (* all specializations of specified root   code *)
valueSetLE           ::= “ <= “ ( ‘A’-‘Z’ )+  (* —specified root code and all specializations *)
valueSetName         ::= upperCamelCase | ( “x_” upperCamelCase ) )
valueSetVersion      ::= “#” ( ‘0’-‘9’ ){8} ( ( ‘0’-‘9’ ){6} )? (* date with optional time *)
strength             ::= “ CWE” | “ CNE”
codeBinding          ::= codeFull		(* used for all non-immutable codes *)
                       | codeShort		(* used for all immutable codes  *)

codeFull             ::= “ = C:” ( codeSystemName | oid ) “#” anyText
codeSystemName       ::= upperCamelCase
codeShort            ::= “ =” anyText
fixedValue           ::= ‘ = “’ anyDefaultText ‘”’
enumeration          ::= “ = [“ enumerationVals “]”
enumerationVals      ::= ‘”’ anyText ‘”’ ( ‘, “’ anyText ‘”’ )*
allowedRange         ::= “ = [“ number “..” number “]”
lengthLimits         ::= “ Len=” ( fixedLength | lengthRange )
fixedLength          ::= number
lengthRange          ::= number “..” number
updateMode           ::= “ {“ mode ( “: “ modeList )? “}”
modeList             ::= mode | mode “,” modeList
mode                 ::= 'A' | ‘AR’ | 'D' | ‘K’ | ‘N’ | ‘R’ | ‘REF’ | 'U'
extensionOid         ::= “ EXT:” oid
businessNames        ::= businessName (“ “ businessNames)?
businessName         ::= “ (“ realm? anyText “)”	(* Must exclude “(“ *)
realm                ::= (‘A’-‘Z’){2} “-“
oid                  ::= ('0'-'9')+ (“.” ( ‘0’-‘9’ )+ )+
number               ::= ( ‘0’-‘9’ )+
upperCamelCase       ::= ( ‘A’-’Z’ )+ ( ‘a’-‘z’ | ’A’-‘Z’ | ‘0’-‘9’ )*
lowerCamelCase       ::= ( ‘a’-’z’ )+ ( ‘a’-‘z’ | ’A’-‘Z’ | ‘0’-‘9’ )*
anyText              ::= ( ‘a’-‘z’ | ’A’-‘Z’ | ‘0’-‘9’ | ‘ ‘ | ‘-‘ | ‘_’ | ‘#’ | ‘&’ | ':' | '/' | '.' )*
anyDefaultText       ::= ( ‘a’-‘z’ | ’A’-‘Z’ | ‘0’-‘9’ | ‘ ‘ | ‘-‘ | ‘_’ | ‘#’ | ‘&’ | ':' | '/' | '.' | '{' | '}' | '[' | ']' | '(' | ')' | ';' | '@' | '+' )*
                         (* Note: Some of the content in anyDefaultText will cause issues with determinism.  Applications will need to rely  *)
                         (*       on the declared type and abstract datatype rules to perform more intelligent parsing.                      *)                  

Examples:

moodCode: CS [1..1] { M <= INT }

code: CD [0..1] { R < CD: ActProcedureCode (CA-Procedure Type) }

code: CV [1..1] { M < = C:LN#123456 }

sequenceNumber: INT [1..1] { M =[1..10] }

addr: DSET(AD) [0..*] { R {A: A,AR,R,D} (Mailing addresses) }

RMIM Association rendering

association      ::= cardinality hl7AssocMetadata EOL associationName
hl7AssocMetadata ::= “{“ mandatoryConf (" " updateMode)? “}”
associationName  ::= lowerCamelCase

Examples:

1..1 {M}
assignedPerson


0..1 {R {A: A,AR,R,D}}
assignedPerson

CMET Rendering

cmet                ::= “<CMET>” EOL cmetName ” “ attribution EOL separatorLine att?
cmetName            ::= cmetAct  |  cmetEntity  |  cmetRole  | cmetOther
cmetAct             ::= “A_” upperCamelCase
cmetEntity          ::= “E_” upperCamelCase 
cmetOther           ::= “O_” upperCamelCase
cmetRole            ::= “R_” upperCamelCase
attribution         ::= “[” cmetAttributionKindanyText “]”
cmetAttributionKind ::= anyText
att                 ::= “classCode { < ” ( ‘A’-‘Z’ )+ “ }”

Examples:

<CMET>
R_AssignedPerson universal


classCode { < OBS }

STUB rendering

stub       ::= ”<STUB>” EOL stubName separatorLine att?
stubName   ::= stubAct | stubEntity | stubRole | stubOther
stubAct    ::= “A_” upperCamelCase
stubEntity ::= “E_” upperCamelCase
stubRole   ::= “R_” upperCamelCase 
stubbOther ::= “O_” upperCamelCase
att        ::= “classCode { < ” ( ‘A’-‘Z’ )+ “ }”

Examples:

<STUB>
R_Payload


classCode { < ROL }