The Prototype
Cloning an existing spirit record to create a new spectral entity.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Prototype
ARCANUM SCHOOL: Illusion // Shadow-Cloning
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
PROTOTYPE ; Prototype Pattern in MUMPS
; Cloning global subtrees to replicate patients.
;
CLONE(SOURCEID, NEWID) ;
N NODE
K ^PATIENT(NEWID)
S NODE=""
F S NODE=$O(^PATIENT(SOURCEID,NODE)) Q:NODE="" D
. S ^PATIENT(NEWID,NODE)=^PATIENT(SOURCEID,NODE)
W "Cloned entity ",SOURCEID," into ",NEWID,!
Q
Runic Tags:
#creational
#prototype
#mumps
#necromancy