Skip to content

Instantly share code, notes, and snippets.

View jnsereko's full-sized avatar
😂
show me that code

jnsereko jnsereko

😂
show me that code
View GitHub Profile
@jnsereko
jnsereko / gist:233efcad2757a6a5894628b5e64f338e
Created March 13, 2025 12:25
Patient ID Sticker Configuration
{
"printPatientSticker": {
"pageSize": "70mm 50mm",
"header": {
"showBarcode": true,
"showLogo": false
},
"printStickerFields": {
"fields": [
"identifier",
//lastn is an operational type
@Operation(name="$lastn", idempotent=true)
public Bundle getLastnObservation( @OptionalParam(name=Observation.SP_SUBJECT) ReferenceParam reference,
Intenger max){
//this is what I think is to be done
return getCurrentSession().createCriteria(Obs.class).createAlias("obs.person_id", "oi")
.add(Restrictions.eq("oi", reference.getValue()) //restiction to get patient with entered ID
.setMaxResults(max);
.list()
}