
The header parameter JWS defines as mandatory
for a signature is the Algorithm (alg). This parameter
is protected and serves to identify the cryptographic
algorithm used for the security of the JWS. There-
fore, a JWS signature will be invalid if the alg does
not contain a supported algorithm or if no associated
cryptographic algorithm exists for the MAC content
(Jones et al., 2015). The mandatory header parameter
defined for a JAdES signature is the Claiming Sign-
ing Time (sigT). This is a protected parameter whose
function is to specify the moment the signer intends
to perform the signing process. Thus, the record must
include a string in Coordinated Universal Time (UTC)
format indicating the time of the signature.
The protected header parameter Critical indicates
which extension parameters are used in the signature
and must be processed and understood. Thus, a list
that should never be empty is generated when it in-
cludes parameters that need to be processed (Jones
et al., 2015). In the case of JAdES, the attributes eligi-
ble to be included in the Critical list are: sigT, x5t#o,
sigX5ts, srCms, sigPl, srAts, adoTst and sigPId (In-
stitute, 2021). The content type (cty) header param-
eter is used to indicate the media type contained in
the JWS payload of the document. This parameter is
included when more than one type of object may be
present in the JWS payload, allowing the application
to use the value of this parameter to eliminate ambi-
guity regarding the data that may be present in the
document.
The header parameters X.509 Certificate SHA-
256 Thumbprint (x5t#S256), X.509 Certificate Digest
(x5t#o), and X.509 Certificates Digests (sigX5ts) are
protected parameters intended to indicate the message
digest responsible for hashing the document. The
x5t#S256 was defined in JWS as an optional attribute
and is specific for use with SHA-256. The parameters
x5t#o and sigX5ts are defined by JAdES, where x5t#o
is used for any hashing algorithm other than SHA-
256, while sigX5ts is utilized when multiple certifi-
cates are used in the signature. In addition to defin-
ing the requirements for the parameters as mentioned
above, the deprecation of the X.509 Certificate SHA-
1 (x5t) defined for JWS signatures is noted due to
its vulnerability, making it easier to break encryption
and retrieve information from the signature (Institute,
2021).
The header parameter X.509 Certificate Chain
(x5c) contains the X.509 public key certificate or the
chain of certificates corresponding to the key used to
sign the JWS digitally. Thus, x5c is a list of cer-
tificates represented as a string value in Base64 for-
mat. This parameter must be present if the parameters
x5t#S256, x5t#o or sigX5ts are not included; other-
wise, its inclusion is optional. In addition to includ-
ing protected parameters, it is possible to add unpro-
tected parameters, which are inserted into a list of pa-
rameters called etsi Unsigned (etsiU), with all entries
formatted in Base64. Table 1 shows the minimum pa-
rameters required for creating a JAdES document at
level B-B.
Table 1: Minimun parameters needed to create a JAdES sig-
nature.
Parameter Mandatory level
Alg Mandatory
SigT Mandatory
Crit Mandatory (sigT)
Cty Mandatory (multiple media)
X5t#S256 Conditioned (without x5c, x5t#o, sigX5ts)
X5t#o Conditioned (without x5c, x5t#S256, sigX5ts)
SigX5ts Conditioned (without x5c, x5t#o, x5t#S256)
X5c Conditioned (without x5t#S256, x5t#o, sigX5ts)
3 HL7 FHIR
HL7 is a nonprofit organization providing frame-
works and standards that facilitate the exchange, in-
tegration, sharing, and retrieval of electronic health
information to support clinical practices and the han-
dling, delivery, and verification of healthcare services
(Health Level Seven International, 2023). HL7 FHIR
is a platform specification that defines a set of capabil-
ities for interoperability processes within the health-
care sector (Health Level Seven International, 2023).
According to (Monsen et al., 2023), it is a solution for
sharing health data information using modular com-
ponents, with numerous developers working tirelessly
to contribute to various specification components that
can be utilized in different contexts, such as best prac-
tice guidelines, clinical document architecture trans-
lation, and clinical care of injuries.
Before the HL7 FHIR standard, other standards
were developed with the same purpose. Still, they had
a lower level of human-readable abstraction, which
resulted in greater effort required for data interpre-
tation. One example is HL7 V2, created in 1989 to
integrate various hospital systems, including admin-
istrative processes and clinical systems (Bender and
Sartipi, 2013). Despite its application, the HL7 V2
standard lacked good scalability. It could not adapt to
other use cases, such as the judicial system, and was
difficult to comprehend, as illustrated in Algorithm 1.
The next standard developed was HL7 V3, created
in 1995 to address the deficiencies of its predecessor.
Semantic and lexical element structures were defined
for this standard to generate message artifacts auto-
matically. However, the standards are not directly im-
plementable and require tools to create software sys-
tems. It offers available XML schemas but not norma-
Digital Medication Prescription System with JSON
837